From owner-freebsd-audit Wed Mar 28 1:52:12 2001 Delivered-To: freebsd-audit@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by hub.freebsd.org (Postfix) with ESMTP id 8303E37B718; Wed, 28 Mar 2001 01:52:06 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.3/8.11.3) with ESMTP id f2S9q3391806; Wed, 28 Mar 2001 11:52:03 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: audit@freebsd.org, current@freebsd.org Cc: kirk@mckusick.com Subject: fsck pass sanitizing patch From: Poul-Henning Kamp Date: Wed, 28 Mar 2001 11:52:03 +0200 Message-ID: <91804.985773123@critter> Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have put up a patch which sanitizes the fsck passno handling, you will find it at http://phk.freebsd.dk/patch/ Apologies to Kirk if this conflics with any of his work on delayed fsck... 20010328 fsck.patch This patch sanitizes the way fsck deals with pass numbers. Consider this /etc/fstab: # Device Mountpoint FStype Options Dump Pass# /dev/ad1s1b none swap sw 0 0 /dev/ad0s1b none swap sw 0 0 /dev/ad0s1a / ufs rw 1 1 /dev/ad0s1e /home ufs rw 2 2 /dev/ad1s1e /tmp ufs rw 2 2 /dev/ad1s1f /usr ufs rw 2 2 /dev/ccd0c /syv ufs rw 2 11 proc /proc procfs rw 0 0 ccd0c is striped over /dev/ad0f and /dev/ad1g Without this pass, fsck in preen mode will check ad0s1a first, and then issue three processes in parallel: One process doing ad0s1e One process doing ad1s1e and ad1s1f One process doing ccd0c There is no way to tell it that ccd0c overlaps ad0 and ad1. With the patch, it will do it this way: pass 2: One process doing ad0s1e One process doing ad1s1e and ad1s1f and when they are complete: pass 11: One process doing ccd0c This is much faster and more sane. I retired the '-l' option which tried to allow people to do something like this, but which didn't work and which complicated the code an awful lot. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message