Occationally background fsck would cause a spurious ``freeing free

inode'' panic. This change corrects that problem by setting the
fs_active flag when the inode map changes to notify the snapshot
code that the cylinder group must be rescanned.

Submitted by:	Robert Watson <rwatson@FreeBSD.org>
This commit is contained in:
mckusick 2002-02-07 22:13:56 +00:00
parent f5604f2085
commit 88b4f0b921

View File

@ -1416,6 +1416,8 @@ gotit:
fs->fs_cstotal.cs_ndir++;
fs->fs_cs(fs, cg).cs_ndir++;
}
if (fs->fs_active != 0)
atomic_clear_int(&ACTIVECGNUM(fs, cg), ACTIVECGOFF(cg));
bdwrite(bp);
return (cg * fs->fs_ipg + ipref);
}
@ -1684,6 +1686,8 @@ ffs_freefile(fs, devvp, ino, mode)
fs->fs_cs(fs, cg).cs_ndir--;
}
fs->fs_fmod = 1;
if (fs->fs_active != 0)
atomic_clear_int(&ACTIVECGNUM(fs, cg), ACTIVECGOFF(cg));
bdwrite(bp);
return (0);
}