From owner-cvs-all Mon Jan 15 10:31: 5 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A4DA237B400; Mon, 15 Jan 2001 10:30:41 -0800 (PST) Received: (from iedowse@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f0FIUfe93054; Mon, 15 Jan 2001 10:30:41 -0800 (PST) (envelope-from iedowse) Message-Id: <200101151830.f0FIUfe93054@freefall.freebsd.org> From: Ian Dowse Date: Mon, 15 Jan 2001 10:30:41 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sbin/dumpfs dumpfs.c src/sbin/fsck_ffs fsutil.c setup.c src/sbin/fsck_ifs fsutil.c setup.c src/sbin/newfs mkfs.c src/sys/ufs/ffs ffs_snapshot.c ffs_vfsops.c fs.h X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG iedowse 2001/01/15 10:30:41 PST Modified files: sbin/dumpfs dumpfs.c sbin/fsck_ffs fsutil.c setup.c sbin/fsck_ifs fsutil.c setup.c sbin/newfs mkfs.c sys/ufs/ffs ffs_snapshot.c ffs_vfsops.c fs.h Log: The ffs superblock includes a 128-byte region for use by temporary in-core pointers to summary information. An array in this region (fs_csp) could overflow on filesystems with a very large number of cylinder groups (~16000 on i386 with 8k blocks). When this happens, other fields in the superblock get corrupted, and fsck refuses to check the filesystem. Solve this problem by replacing the fs_csp array in 'struct fs' with a single pointer, and add padding to keep the length of the 128-byte region fixed. Update the kernel and userland utilities to use just this single pointer. With this change, the kernel no longer makes use of the superblock fields 'fs_csshift' and 'fs_csmask'. Add a comment to newfs/mkfs.c to indicate that these fields must be calculated for compatibility with older kernels. Reviewed by: mckusick Revision Changes Path 1.14 +3 -3 src/sbin/dumpfs/dumpfs.c 1.3 +2 -2 src/sbin/fsck_ffs/fsutil.c 1.19 +5 -4 src/sbin/fsck_ffs/setup.c 1.3 +2 -2 src/sbin/fsck_ifs/fsutil.c 1.20 +5 -4 src/sbin/fsck_ifs/setup.c 1.33 +6 -1 src/sbin/newfs/mkfs.c 1.9 +5 -2 src/sys/ufs/ffs/ffs_snapshot.c 1.135 +17 -16 src/sys/ufs/ffs/ffs_vfsops.c 1.17 +17 -19 src/sys/ufs/ffs/fs.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message