1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

Disable the dirhash sanity check that panics if an unused directory

entry (d_ino == 0) is found in a position that is not the start of
a DIRBLKSIZ block.

While such entries cannot occur normally (ufs always extends the
previous entry to cover the free space instead), they do not cause
problems and fsck does not fix them, so panicking is bad.
This commit is contained in:
Ian Dowse 2001-07-27 18:45:41 +00:00
parent 386a59d734
commit 54d6d2dfaf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=80456

View File

@ -815,8 +815,16 @@ ufsdirhash_checkblock(struct inode *ip, char *buf, doff_t offset)
panic("ufsdirhash_checkblock: bad dir");
if (dp->d_ino == 0) {
#if 0
/*
* XXX entries with d_ino == 0 should only occur
* at the start of a DIRBLKSIZ block. However the
* ufs code is tolerant of such entries at other
* offsets, and fsck does not fix them.
*/
if (i != 0)
panic("ufsdirhash_checkblock: bad dir inode");
#endif
nfree += dp->d_reclen;
continue;
}