summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs/ffs_vfsops.c
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2001-04-17 05:37:51 +0000
committermckusick <mckusick@FreeBSD.org>2001-04-17 05:37:51 +0000
commitba66879022d3c6c75ba0ccdfcd7e792ff48d282a (patch)
tree2553da412fa22dff48b7c4de333036ee14a5de30 /sys/ufs/ffs/ffs_vfsops.c
parent6ea67910b6c31062d12f1309cbdd9e4c86881ff7 (diff)
downloadFreeBSD-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/ufs/ffs/ffs_vfsops.c')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 80bed87..aa2960d 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -499,6 +499,10 @@ loop:
return (0);
}
+#include <sys/sysctl.h>
+int bigcgs = 0;
+SYSCTL_INT(_debug, OID_AUTO, bigcgs, CTLFLAG_RW, &bigcgs, 0, "");
+
/*
* Common code for mount and mountroot
*/
@@ -701,6 +705,11 @@ ffs_mountfs(devvp, mp, p, malloctype)
maxfilesize = (u_int64_t)0x40000000 * fs->fs_bsize - 1; /* XXX */
if (fs->fs_maxfilesize > maxfilesize) /* XXX */
fs->fs_maxfilesize = maxfilesize; /* XXX */
+ if (bigcgs) {
+ if (fs->fs_sparecon[0] <= 0)
+ fs->fs_sparecon[0] = fs->fs_cgsize;
+ fs->fs_cgsize = fs->fs_bsize;
+ }
if (ronly == 0) {
if ((fs->fs_flags & FS_DOSOFTDEP) &&
(error = softdep_mount(devvp, mp, fs, cred)) != 0) {
@@ -806,6 +815,10 @@ ffs_unmount(mp, mntflags, p)
return (error);
}
fs = ump->um_fs;
+ if (bigcgs) {
+ fs->fs_cgsize = fs->fs_sparecon[0];
+ fs->fs_sparecon[0] = 0;
+ }
if (fs->fs_ronly == 0) {
fs->fs_clean = fs->fs_flags & (FS_UNCLEAN|FS_NEEDSFSCK) ? 0 : 1;
error = ffs_sbupdate(ump, MNT_WAIT);
OpenPOWER on IntegriCloud