summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
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/mips64
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/mips64')
-rw-r--r--sys/arch/mips64/mips64/disksubr.c10
1 files changed, 5 insertions, 5 deletions
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;
}
}