summaryrefslogtreecommitdiffstats
path: root/sys/ufs
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-07-27 18:45:41 +0000
committeriedowse <iedowse@FreeBSD.org>2001-07-27 18:45:41 +0000
commit585713254598dfa5f24ce676b35e7f51e353b5d1 (patch)
tree85c130a0c4a66f373b475162c5b26a65ded983ce /sys/ufs
parent3821f71b772127a1f01be1fa7198511acdde6a7d (diff)
downloadFreeBSD-src-585713254598dfa5f24ce676b35e7f51e353b5d1.zip
FreeBSD-src-585713254598dfa5f24ce676b35e7f51e353b5d1.tar.gz
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.
Diffstat (limited to 'sys/ufs')
-rw-r--r--sys/ufs/ufs/ufs_dirhash.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/ufs/ufs/ufs_dirhash.c b/sys/ufs/ufs/ufs_dirhash.c
index 1a9262a..e9441cb 100644
--- a/sys/ufs/ufs/ufs_dirhash.c
+++ b/sys/ufs/ufs/ufs_dirhash.c
@@ -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;
}
OpenPOWER on IntegriCloud