summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2007-05-29 06:28:17 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2007-05-29 06:28:17 +0000
commit444b0299644e2e692c1f8d00d8b1caa0acea33a3 (patch)
tree1b53b5865bcc8b3675238c2ebdd9daf6797ccd39 /sys/arch
parent3f6176ec485942a0e5cfcc7e61ca01950df6452c (diff)
Updated disklabel format to support larger disks and partitions. We
free room in struct partition by packing fragment size and fragments/block more tighlty and use the resulting space to make offset and size 48 bits. For the disk part we use spare fields in struct disklabel. Kernel converts in-mem copy of the on-disk label if needed, disklabel(8) writes new version. We are careful to only change fields not used by bootloaders. Conception of basic scheme by deraadt. ok deraadt@ krw@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/alpha/disksubr.c6
-rw-r--r--sys/arch/amd64/amd64/disksubr.c6
-rw-r--r--sys/arch/arm/arm/disksubr.c6
-rw-r--r--sys/arch/aviion/aviion/disksubr.c6
-rw-r--r--sys/arch/hp300/hp300/disksubr.c6
-rw-r--r--sys/arch/hppa/hppa/disksubr.c6
-rw-r--r--sys/arch/hppa64/hppa64/disksubr.c6
-rw-r--r--sys/arch/i386/i386/disksubr.c6
-rw-r--r--sys/arch/landisk/landisk/disksubr.c6
-rw-r--r--sys/arch/luna88k/luna88k/disksubr.c7
-rw-r--r--sys/arch/mac68k/mac68k/disksubr.c6
-rw-r--r--sys/arch/macppc/macppc/disksubr.c6
-rw-r--r--sys/arch/mips64/mips64/disksubr.c10
-rw-r--r--sys/arch/mvme68k/mvme68k/disksubr.c6
-rw-r--r--sys/arch/mvme88k/mvme88k/disksubr.c6
-rw-r--r--sys/arch/mvmeppc/mvmeppc/disksubr.c6
-rw-r--r--sys/arch/sparc/sparc/disksubr.c11
-rw-r--r--sys/arch/sparc64/sparc64/disksubr.c11
-rw-r--r--sys/arch/sparc64/stand/ofwboot/ofdev.c6
-rw-r--r--sys/arch/vax/vax/disksubr.c6
20 files changed, 69 insertions, 66 deletions
diff --git a/sys/arch/alpha/alpha/disksubr.c b/sys/arch/alpha/alpha/disksubr.c
index 141dd05afea..8fe69125170 100644
--- a/sys/arch/alpha/alpha/disksubr.c
+++ b/sys/arch/alpha/alpha/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.68 2007/05/29 05:08:19 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.69 2007/05/29 06:28:14 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -194,6 +194,7 @@ done:
bp->b_flags |= B_INVAL;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -450,8 +451,7 @@ setdisklabel(olp, nlp, openmask, osdep)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/amd64/amd64/disksubr.c b/sys/arch/amd64/amd64/disksubr.c
index d0395f77af6..a084c728ef7 100644
--- a/sys/arch/amd64/amd64/disksubr.c
+++ b/sys/arch/amd64/amd64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.32 2007/05/29 05:08:19 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.33 2007/05/29 06:28:14 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -316,6 +316,7 @@ done:
bp->b_flags |= B_INVAL;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -362,8 +363,7 @@ setdisklabel(struct disklabel *olp, struct disklabel *nlp, u_long openmask,
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/arm/arm/disksubr.c b/sys/arch/arm/arm/disksubr.c
index 818d8e695c5..bf75cf30c28 100644
--- a/sys/arch/arm/arm/disksubr.c
+++ b/sys/arch/arm/arm/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.27 2007/05/29 05:08:19 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.28 2007/05/29 06:28:14 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -292,6 +292,7 @@ done:
bp->b_flags |= B_INVAL;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -340,8 +341,7 @@ setdisklabel(olp, nlp, openmask, osdep)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/aviion/aviion/disksubr.c b/sys/arch/aviion/aviion/disksubr.c
index 000ff6aa2c1..13cd52806e0 100644
--- a/sys/arch/aviion/aviion/disksubr.c
+++ b/sys/arch/aviion/aviion/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.18 2007/05/29 05:08:19 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.19 2007/05/29 06:28:14 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -292,6 +292,7 @@ done:
bp->b_flags |= B_INVAL;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -340,8 +341,7 @@ setdisklabel(olp, nlp, openmask, osdep)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/hp300/hp300/disksubr.c b/sys/arch/hp300/hp300/disksubr.c
index 025a2e5b57e..84e8442e8eb 100644
--- a/sys/arch/hp300/hp300/disksubr.c
+++ b/sys/arch/hp300/hp300/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.24 2007/05/29 05:08:19 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.25 2007/05/29 06:28:14 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.9 1997/04/01 03:12:13 scottr Exp $ */
/*
@@ -125,6 +125,7 @@ done:
bp->b_flags = B_INVAL | B_AGE;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -158,8 +159,7 @@ setdisklabel(olp, nlp, openmask, osdep)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/hppa/hppa/disksubr.c b/sys/arch/hppa/hppa/disksubr.c
index 313649991d2..7b7991dbe33 100644
--- a/sys/arch/hppa/hppa/disksubr.c
+++ b/sys/arch/hppa/hppa/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.48 2007/05/29 05:08:19 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.49 2007/05/29 06:28:15 otto Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -197,6 +197,7 @@ done:
bp->b_flags |= B_INVAL;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -615,8 +616,7 @@ setdisklabel(olp, nlp, openmask, osdep)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/hppa64/hppa64/disksubr.c b/sys/arch/hppa64/hppa64/disksubr.c
index 60bba818722..678dfee3469 100644
--- a/sys/arch/hppa64/hppa64/disksubr.c
+++ b/sys/arch/hppa64/hppa64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.31 2007/05/29 05:08:19 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.32 2007/05/29 06:28:15 otto Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -193,6 +193,7 @@ done:
bp->b_flags |= B_INVAL;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -611,8 +612,7 @@ setdisklabel(olp, nlp, openmask, osdep)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c
index ec7e97d05a7..7cb6237ba9a 100644
--- a/sys/arch/i386/i386/disksubr.c
+++ b/sys/arch/i386/i386/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.72 2007/05/29 05:08:20 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.73 2007/05/29 06:28:15 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -316,6 +316,7 @@ done:
bp->b_flags |= B_INVAL;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -362,8 +363,7 @@ setdisklabel(struct disklabel *olp, struct disklabel *nlp, u_long openmask,
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/landisk/landisk/disksubr.c b/sys/arch/landisk/landisk/disksubr.c
index c176cae4e4a..2ccb0a91e9d 100644
--- a/sys/arch/landisk/landisk/disksubr.c
+++ b/sys/arch/landisk/landisk/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.15 2007/05/29 05:08:20 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.16 2007/05/29 06:28:15 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -292,6 +292,7 @@ done:
bp->b_flags |= B_INVAL;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -340,8 +341,7 @@ setdisklabel(olp, nlp, openmask, osdep)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/luna88k/luna88k/disksubr.c b/sys/arch/luna88k/luna88k/disksubr.c
index 9168329f120..1112ef4a592 100644
--- a/sys/arch/luna88k/luna88k/disksubr.c
+++ b/sys/arch/luna88k/luna88k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.11 2007/05/29 05:08:20 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.12 2007/05/29 06:28:15 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.12 2002/02/19 17:09:44 wiz Exp $ */
/*
@@ -208,6 +208,7 @@ done:
bp->b_flags = B_INVAL | B_AGE | B_READ;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -453,8 +454,8 @@ disklabel_om_to_bsd(cp, lp)
* XXX: (Should remove that code from newfs...)
*/
if (npp->p_fstype == FS_BSDFFS) {
- npp->p_fsize = 1024;
- npp->p_frag = 8;
+ npp->p_fragblock =
+ DISKLABELV1_FFS_FRAGBLOCK(1024, 8);
npp->p_cpg = 16;
}
}
diff --git a/sys/arch/mac68k/mac68k/disksubr.c b/sys/arch/mac68k/mac68k/disksubr.c
index 84ec4f989c3..ad775c8b45c 100644
--- a/sys/arch/mac68k/mac68k/disksubr.c
+++ b/sys/arch/mac68k/mac68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.32 2007/05/29 05:08:20 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.33 2007/05/29 06:28:15 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.22 1997/11/26 04:18:20 briggs Exp $ */
/*
@@ -436,6 +436,7 @@ done:
bp->b_flags |= B_INVAL;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -481,8 +482,7 @@ setdisklabel(olp, nlp, openmask, osdep)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c
index 8b274d31fe2..34ee90539af 100644
--- a/sys/arch/macppc/macppc/disksubr.c
+++ b/sys/arch/macppc/macppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.37 2007/05/29 05:08:20 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.38 2007/05/29 06:28:15 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -381,6 +381,7 @@ done:
bp->b_flags |= B_INVAL;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -427,8 +428,7 @@ setdisklabel(struct disklabel *olp, struct disklabel *nlp, u_long openmask,
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/mips64/mips64/disksubr.c b/sys/arch/mips64/mips64/disksubr.c
index f48e84212a2..f191f688e19 100644
--- a/sys/arch/mips64/mips64/disksubr.c
+++ b/sys/arch/mips64/mips64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.37 2007/05/29 05:08:20 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.38 2007/05/29 06:28:15 otto Exp $ */
/*
* Copyright (c) 1999 Michael Shalayeff
@@ -201,6 +201,7 @@ done:
bp->b_flags |= B_INVAL;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -501,8 +502,8 @@ static struct {int m; int b;} maptab[] = {
lp->d_partitions[bsd].p_size = dlp->partitions[i].blocks;
lp->d_partitions[bsd].p_fstype = maptab[i].b;
if (lp->d_partitions[bsd].p_fstype == FS_BSDFFS) {
- lp->d_partitions[bsd].p_fsize = 1024;
- lp->d_partitions[bsd].p_frag = 8;
+ lp->d_partitions[bsd].p_fragblock =
+ DISKLABELV1_FFS_FRAGBLOCK(1024, 8);
lp->d_partitions[bsd].p_cpg = 16;
}
}
@@ -561,8 +562,7 @@ setdisklabel(olp, nlp, openmask, osdep)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/mvme68k/mvme68k/disksubr.c b/sys/arch/mvme68k/mvme68k/disksubr.c
index 1dd4d51b7b2..13ceb97c242 100644
--- a/sys/arch/mvme68k/mvme68k/disksubr.c
+++ b/sys/arch/mvme68k/mvme68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.38 2007/05/29 05:08:20 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.39 2007/05/29 06:28:15 otto Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1995 Dale Rahn.
@@ -147,6 +147,7 @@ done:
bp->b_flags = B_INVAL | B_AGE | B_READ;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -202,8 +203,7 @@ setdisklabel(olp, nlp, openmask, clp)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/mvme88k/mvme88k/disksubr.c b/sys/arch/mvme88k/mvme88k/disksubr.c
index 04dbd071675..bd9535d72d7 100644
--- a/sys/arch/mvme88k/mvme88k/disksubr.c
+++ b/sys/arch/mvme88k/mvme88k/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.34 2007/05/29 05:08:20 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.35 2007/05/29 06:28:15 otto Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1995 Dale Rahn.
@@ -144,6 +144,7 @@ done:
bp->b_flags = B_INVAL | B_AGE | B_READ;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -199,8 +200,7 @@ setdisklabel(olp, nlp, openmask, clp)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/mvmeppc/mvmeppc/disksubr.c b/sys/arch/mvmeppc/mvmeppc/disksubr.c
index 0b538400c3a..00d369c3c77 100644
--- a/sys/arch/mvmeppc/mvmeppc/disksubr.c
+++ b/sys/arch/mvmeppc/mvmeppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.33 2007/05/29 05:08:20 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.34 2007/05/29 06:28:15 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1996/05/03 19:42:03 christos Exp $ */
/*
@@ -295,6 +295,7 @@ done:
bp->b_flags |= B_INVAL;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -343,8 +344,7 @@ setdisklabel(olp, nlp, openmask, osdep)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}
diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c
index 8d9ceeaf2ac..c8394812869 100644
--- a/sys/arch/sparc/sparc/disksubr.c
+++ b/sys/arch/sparc/sparc/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.43 2007/05/29 05:08:20 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.44 2007/05/29 06:28:15 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.16 1996/04/28 20:25:59 thorpej Exp $ */
/*
@@ -186,6 +186,7 @@ done:
bp->b_flags = B_INVAL | B_AGE | B_READ;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -448,8 +449,8 @@ disklabel_sun_to_bsd(cp, lp)
* The sun label does not store the FFS fields,
* so just set them with default values here.
*/
- npp->p_fsize = 2048;
- npp->p_frag = 8;
+ npp->p_fragblock =
+ DISKLABELV1_FFS_FRAGBLOCK(2048, 8);
npp->p_cpg = 16;
}
}
@@ -481,8 +482,8 @@ disklabel_sun_to_bsd(cp, lp)
}
npp->p_fstype = sun_fstypes[i+8];
if (npp->p_fstype == FS_BSDFFS) {
- npp->p_fsize = 2048;
- npp->p_frag = 8;
+ npp->p_fragblock =
+ DISKLABELV1_FFS_FRAGBLOCK(2048, 8);
npp->p_cpg = 16;
}
}
diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c
index b0b4987106b..162bcb88134 100644
--- a/sys/arch/sparc64/sparc64/disksubr.c
+++ b/sys/arch/sparc64/sparc64/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.21 2007/05/29 05:08:20 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.22 2007/05/29 06:28:15 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.13 2000/12/17 22:39:18 pk Exp $ */
/*
@@ -185,6 +185,7 @@ done:
bp->b_flags = B_INVAL | B_AGE | B_READ;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -445,8 +446,8 @@ disklabel_sun_to_bsd(cp, lp)
* The sun label does not store the FFS fields,
* so just set them with default values here.
*/
- npp->p_fsize = 2048;
- npp->p_frag = 8;
+ npp->p_fragblock =
+ DISKLABELV1_FFS_FRAGBLOCK(2048, 8);
npp->p_cpg = 16;
}
}
@@ -478,8 +479,8 @@ disklabel_sun_to_bsd(cp, lp)
}
npp->p_fstype = sun_fstypes[i+8];
if (npp->p_fstype == FS_BSDFFS) {
- npp->p_fsize = 2048;
- npp->p_frag = 8;
+ npp->p_fragblock =
+ DISKLABELV1_FFS_FRAGBLOCK(2048, 8)
npp->p_cpg = 16;
}
}
diff --git a/sys/arch/sparc64/stand/ofwboot/ofdev.c b/sys/arch/sparc64/stand/ofwboot/ofdev.c
index 870e7c347b4..e03f7d7bebc 100644
--- a/sys/arch/sparc64/stand/ofwboot/ofdev.c
+++ b/sys/arch/sparc64/stand/ofwboot/ofdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ofdev.c,v 1.8 2006/07/27 20:41:29 deraadt Exp $ */
+/* $OpenBSD: ofdev.c,v 1.9 2007/05/29 06:28:15 otto Exp $ */
/* $NetBSD: ofdev.c,v 1.1 2000/08/20 14:58:41 mrg Exp $ */
/*
@@ -307,8 +307,8 @@ disklabel_sun_to_bsd(cp, lp)
* The sun label does not store the FFS fields,
* so just set them with default values here.
*/
- npp->p_fsize = 1024;
- npp->p_frag = 8;
+ npp->p_fragblock =
+ DISKLABELV1_FFS_FRAGBLOCK(1024, 8);
npp->p_cpg = 16;
}
}
diff --git a/sys/arch/vax/vax/disksubr.c b/sys/arch/vax/vax/disksubr.c
index 59aa57f35af..c94fd2c0ff2 100644
--- a/sys/arch/vax/vax/disksubr.c
+++ b/sys/arch/vax/vax/disksubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: disksubr.c,v 1.34 2007/05/29 05:08:20 krw Exp $ */
+/* $OpenBSD: disksubr.c,v 1.35 2007/05/29 06:28:15 otto Exp $ */
/* $NetBSD: disksubr.c,v 1.21 1999/06/30 18:48:06 ragge Exp $ */
/*
@@ -185,6 +185,7 @@ done:
bp->b_flags = B_INVAL | B_AGE | B_READ;
brelse(bp);
}
+ cvtdisklabelv1(lp);
return (msg);
}
@@ -231,8 +232,7 @@ setdisklabel(olp, nlp, openmask, osdep)
*/
if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) {
npp->p_fstype = opp->p_fstype;
- npp->p_fsize = opp->p_fsize;
- npp->p_frag = opp->p_frag;
+ npp->p_fragblock = opp->p_fragblock;
npp->p_cpg = opp->p_cpg;
}
}