Fsck needs to check each CG's rotor values to ensure thay are not -ve.
It seems a common corruption to have them -ve (I've seen it several times) and if fsck doesn't fix it, it leads to a kernel pagefault. Reviewd by: kirk Submitted by: Eric Jacobs <eaja@erols.com> and me independently. MFC in: 2 days PR: bin/40967 Approved by: re
This commit is contained in:
@@ -184,15 +184,15 @@ pass5(void)
|
||||
newcg->cg_cs.cs_nffree = 0;
|
||||
newcg->cg_cs.cs_nbfree = 0;
|
||||
newcg->cg_cs.cs_nifree = fs->fs_ipg;
|
||||
if (cg->cg_rotor < newcg->cg_ndblk)
|
||||
if ((cg->cg_rotor >= 0) && (cg->cg_rotor < newcg->cg_ndblk))
|
||||
newcg->cg_rotor = cg->cg_rotor;
|
||||
else
|
||||
newcg->cg_rotor = 0;
|
||||
if (cg->cg_frotor < newcg->cg_ndblk)
|
||||
if ((cg->cg_frotor >= 0) && (cg->cg_frotor < newcg->cg_ndblk))
|
||||
newcg->cg_frotor = cg->cg_frotor;
|
||||
else
|
||||
newcg->cg_frotor = 0;
|
||||
if (cg->cg_irotor < fs->fs_ipg)
|
||||
if ((cg->cg_irotor >= 0) && (cg->cg_irotor < fs->fs_ipg))
|
||||
newcg->cg_irotor = cg->cg_irotor;
|
||||
else
|
||||
newcg->cg_irotor = 0;
|
||||
|
||||
Reference in New Issue
Block a user