Subject: fixing newfs(8) manpage
To: None <tech-kern@NetBSD.org>
From: Peter Postma <peter@pointless.nl>
List: tech-kern
Date: 06/20/2005 12:18:43
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.


----- Forwarded message from Peter Postma <peter@pointless.nl> -----

Date: Fri, 17 Jun 2005 19:32:04 +0200
To: tech-userlevel@NetBSD.org
From: Peter Postma <peter@pointless.nl>
Subject: fixing newfs(8) manpage
Mail-Followup-To: tech-userlevel@NetBSD.org
User-Agent: Mutt/1.5.9i

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

----- End forwarded message -----

-- 
Peter Postma