fsck pass sanitizing patch

2001-03-28 Thread Poul-Henning Kamp


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...

20010328fsck.patch

This patch sanitizes the way fsck deals with pass numbers.

Consider this /etc/fstab:

# Device Mountpoint  FStype  OptionsDumpPass#
/dev/ad1s1b  noneswapsw 0   0
/dev/ad0s1b  noneswapsw 0   0
/dev/ad0s1a  /   ufs rw 1   1
/dev/ad0s1e  /home   ufs rw 2   2
/dev/ad1s1e  /tmpufs rw 2   2
/dev/ad1s1f  /usrufs rw 2   2
/dev/ccd0c   /syvufs 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
[EMAIL PROTECTED] | 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: fsck pass sanitizing patch

2001-03-28 Thread Chris Dillon

On Wed, 28 Mar 2001, Poul-Henning Kamp wrote:

 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

I've always assigned a ccd (this would apply to Vinum volumes as well,
I'd think) a pass number of 1.  According to the fsck manual page,
each filesystem with a pass number of 1 is processed by itself.  The
code might say something different (which I've looked at but can't
quite figure out how that is handled).  If assigning a pass number of
1 doesn't do that, we probably should either fix the code so it does,
or change the manual pages to match.  :-)


-- Chris Dillon - [EMAIL PROTECTED] - [EMAIL PROTECTED]
   FreeBSD: The fastest and most stable server OS on the planet.
   For IA32 and Alpha architectures. IA64, PPC, and ARM under development.
   http://www.freebsd.org



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: fsck pass sanitizing patch

2001-03-28 Thread Poul-Henning Kamp

In message [EMAIL PROTECTED], Chr
is Dillon writes:
On Wed, 28 Mar 2001, Poul-Henning Kamp wrote:

 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

I've always assigned a ccd (this would apply to Vinum volumes as well,
I'd think) a pass number of 1.

Pass number 1 in magic in that it is sequential.  Traditional
wisdom (or lack thereoff) have only put rootfs in pass 1.

Until my patch, pass 1 would certainly be better for ccd
than pass  1.

--
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED] | 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message