Subject: Re: fixing newfs(8) manpage
To: Peter Postma <peter@pointless.nl>
From: Darrin B.Jewell <dbj@netbsd.org>
List: tech-kern
Date: 06/23/2005 21:30:56
Peter Postma <peter@pointless.nl> writes:
> I'm forwarding this message to this list, in the hope to get more response.
> Someone with good knowledge about UFS/UFS2, please check if I got this right.
>
>
> From: Peter Postma <peter@pointless.nl>
> Subject: fixing newfs(8) manpage
> To: tech-userlevel@NetBSD.org
> Date: Fri, 17 Jun 2005 19:32:04 +0200
>
> I'm trying to fix PR/26883, to correct documentation in newfs(8).
> The following section has got some incorrectness:
>
> -a maxcontig
> This specifies the maximum number of contiguous blocks that
> will be laid out before forcing a rotational delay (see the
> -d option). The default value is 8. See tunefs(8) for more
> details on how to set this option.
>
> I've searched in the CVS history and came to the following conclusions:
>
> * The -d flag in newfs(8) was removed when UFS2 support was added but the
> flag was added back later but with another meaning.
> * tunefs(8) no longer has -a and -d. According to the FreeBSD log, -d was
> removed when UFS2 support has been added and -a was removed because to
> quote the log: "Remove the -a maxcontig option, the kernel doesn't
> inspect fs_maxcontig anymore."
> * The description says "The default value is 8", but this really depends
> on the block size according to the code (newfs.c).
>
> If these conclusions are correct, then I think the following diff should
> be enough to make newfs(8) match reality.
>
> Can someone please verify if this is all correct?
>
>
> Index: newfs.8
> ===================================================================
> RCS file: /cvsroot/src/sbin/newfs/newfs.8,v
> retrieving revision 1.64
> diff -u -r1.64 newfs.8
> --- newfs.8 25 Jun 2004 14:44:40 -0000 1.64
> +++ newfs.8 17 Jun 2005 16:46:53 -0000
> @@ -88,13 +88,9 @@
> .Bl -tag -width Fl
> .It Fl a Ar maxcontig
> This specifies the maximum number of contiguous blocks that will be
> -laid out before forcing a rotational delay (see the
> -.Fl d
> -option).
> -The default value is 8.
> -See
> -.Xr tunefs 8
> -for more details on how to set this option.
> +laid out before forcing a rotational delay.
> +The default value depends on the block size (4 for 16KB blocks,
> +8 for 8KB blocks, and 16 for 4KB blocks).
> .It Fl B Ar byte-order
> Specify the metadata byte order of the file system to be created.
> Valid byte orders are
>
> --
> Peter Postma
>
> ----------
>
>
> --
> Peter Postma
The option should probably be removed from newfs as well, the kernel
no longer pays any attention to the value anyway. I would remove
mention of it from the documentation entirely, or just mention that it
sets the obsolete maxcontig parameter.
Otherwise, i don't see anything directly wrong with your changes.
Darrin