This corrects a bug that manifested itself as identifying the last

cylinder group of a UFS1 filesystem as bad. The error was in the check
and not in the cylinder group itself. So even though fsck fixed the
cylinder group correctly, it was still endlessly reported as bad.

PR:		141992
MFC after:	2 weeks
Reported by:	Dan Strick
This commit is contained in:
Kirk McKusick 2010-01-07 00:17:36 +00:00
parent 6f2c3084b5
commit 36ef6b65ff
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201700

View File

@ -436,7 +436,7 @@ check_cgmagic(int cg, struct cg *cgp)
((sblock.fs_magic == FS_UFS1_MAGIC &&
cgp->cg_old_niblk == sblock.fs_ipg &&
cgp->cg_ndblk <= sblock.fs_fpg &&
cgp->cg_old_ncyl == sblock.fs_old_cpg) ||
cgp->cg_old_ncyl <= sblock.fs_old_cpg) ||
(sblock.fs_magic == FS_UFS2_MAGIC &&
cgp->cg_niblk == sblock.fs_ipg &&
cgp->cg_ndblk <= sblock.fs_fpg &&