diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-05-29 06:28:17 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2007-05-29 06:28:17 +0000 |
commit | 444b0299644e2e692c1f8d00d8b1caa0acea33a3 (patch) | |
tree | 1b53b5865bcc8b3675238c2ebdd9daf6797ccd39 /sys/arch/sparc64 | |
parent | 3f6176ec485942a0e5cfcc7e61ca01950df6452c (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/sparc64')
-rw-r--r-- | sys/arch/sparc64/sparc64/disksubr.c | 11 | ||||
-rw-r--r-- | sys/arch/sparc64/stand/ofwboot/ofdev.c | 6 |
2 files changed, 9 insertions, 8 deletions
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; } } |