diff options
author | mckusick <mckusick@FreeBSD.org> | 2001-04-17 05:37:51 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2001-04-17 05:37:51 +0000 |
commit | ba66879022d3c6c75ba0ccdfcd7e792ff48d282a (patch) | |
tree | 2553da412fa22dff48b7c4de333036ee14a5de30 /sys/kern/vfs_bio.c | |
parent | 6ea67910b6c31062d12f1309cbdd9e4c86881ff7 (diff) | |
download | FreeBSD-src-ba66879022d3c6c75ba0ccdfcd7e792ff48d282a.zip FreeBSD-src-ba66879022d3c6c75ba0ccdfcd7e792ff48d282a.tar.gz |
Add debugging option to always read/write cylinder groups as full
sized blocks. To enable this option, use: `sysctl -w debug.bigcgs=1'.
Add debugging option to disable background writes of cylinder
groups. To enable this option, use: `sysctl -w debug.dobkgrdwrite=0'.
These debugging options should be tried on systems that are panicing
with corrupted cylinder group maps to see if it makes the problem
go away. The set of panics in question are:
ffs_clusteralloc: map mismatch
ffs_nodealloccg: map corrupted
ffs_nodealloccg: block not in map
ffs_alloccg: map corrupted
ffs_alloccg: block not in map
ffs_alloccgblk: cyl groups corrupted
ffs_alloccgblk: can't find blk in cyl
ffs_checkblk: partially free fragment
The following panics are less likely to be related to this problem,
but might be helped by these debugging options:
ffs_valloc: dup alloc
ffs_blkfree: freeing free block
ffs_blkfree: freeing free frag
ffs_vfree: freeing free inode
If you try these options, please report whether they helped reduce your
bitmap corruption panics to Kirk McKusick at <mckusick@mckusick.com>
and to Matt Dillon <dillon@earth.backplane.com>.
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 8017e19..4705903 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -604,6 +604,10 @@ breadn(struct vnode * vp, daddr_t blkno, int size, * or in biodone() since the I/O is synchronous. We put it * here. */ + +int dobkgrdwrite = 1; +SYSCTL_INT(_debug, OID_AUTO, dobkgrdwrite, CTLFLAG_RW, &dobkgrdwrite, 0, ""); + int bwrite(struct buf * bp) { @@ -648,7 +652,7 @@ bwrite(struct buf * bp) * This optimization eats a lot of memory. If we have a page * or buffer shortfall we can't do it. */ - if ((bp->b_xflags & BX_BKGRDWRITE) && + if (dobkgrdwrite && (bp->b_xflags & BX_BKGRDWRITE) && (bp->b_flags & B_ASYNC) && !vm_page_count_severe() && !buf_dirty_count_severe()) { |