Index: resize_ffs.c =================================================================== RCS file: /cvsroot/src/sbin/resize_ffs/resize_ffs.c,v retrieving revision 1.13 diff -u -r1.13 resize_ffs.c --- resize_ffs.c 30 Oct 2010 21:16:07 -0000 1.13 +++ resize_ffs.c 29 Nov 2010 19:27:44 -0000 @@ -457,13 +457,11 @@ cg->cg_magic = CG_MAGIC; cg->cg_cgx = cgn; cg->cg_old_ncyl = newsb->fs_old_cpg; - /* fsck whines if the cg->cg_old_ncyl value in the last cg is fs_old_cpg - * instead of zero, when fs_old_cpg is the correct value. */ - /* XXX fix once fsck is fixed */ - if ((cgn == newsb->fs_ncg - 1) /* && (newsb->fs_old_ncyl % newsb->fs_old_cpg) */ ) { + /* Update the cg_old_ncyl value for the last cylinder. */ + if ((cgn == newsb->fs_ncg - 1) && (newsb->fs_old_ncyl % newsb->fs_old_cpg) ) { cg->cg_old_ncyl = newsb->fs_old_ncyl % newsb->fs_old_cpg; } - cg->cg_niblk = newsb->fs_ipg; + cg->cg_old_niblk = newsb->fs_ipg; cg->cg_ndblk = dmax; /* Set up the bitmap pointers. We have to be careful to lay out the * cg _exactly_ the way mkfs and fsck do it, since fsck compares the @@ -1618,14 +1616,10 @@ * keeping track of exactly which ones require it. */ for (i = 0; i < newsb->fs_ncg; i++) cgflags[i] |= CGF_DIRTY | CGF_BLKMAPS | CGF_INOMAPS; - /* Update the cg_old_ncyl value for the last cylinder. The condition is - * commented out because fsck whines if not - see the similar - * condition in grow() for more. */ - /* XXX fix once fsck is fixed */ - /* if (newsb->fs_old_ncyl % newsb->fs_old_cpg) XXX */ -/*XXXJTK*/ - cgs[newsb->fs_ncg - 1]->cg_old_ncyl = - newsb->fs_old_ncyl % newsb->fs_old_cpg; + /* Update the cg_old_ncyl value for the last cylinder. */ + if (newsb->fs_old_ncyl % newsb->fs_old_cpg) + cgs[newsb->fs_ncg - 1]->cg_old_ncyl = + newsb->fs_old_ncyl % newsb->fs_old_cpg; /* Make fs_dsize match the new reality. */ recompute_fs_dsize(); }