Bug 61716 - [patch] newfs(8) code and manpage are out of sync
Summary: [patch] newfs(8) code and manpage are out of sync
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Glen Barber
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-22 11:50 UTC by Radim Kolar
Modified: 2011-02-07 19:20 UTC (History)
0 users

See Also:


Attachments
newfs.8.diff (796 bytes, patch)
2010-08-21 00:39 UTC, Alexander Best
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Radim Kolar 2004-01-22 11:50:11 UTC
Manual page newfs(8) says that default size of max-entent-size (option -d)
is 16*blocksize. 
/usr/src/sbin/newfs/newfs.c line 338-339 sets default 
max-entent-size to blocksize. This leads to poor admin confusion.

Fix: 

I do not know what extent size is better for performance.
Newfs should create filesystems with best performance options set as default,
since very few people are playing with various newfs flags.
Please update code or manpage.
Comment 1 Colin Percival freebsd_committer freebsd_triage 2004-01-24 02:00:58 UTC
Responsible Changed
From-To: freebsd-bugs->mckusick

Assign to Mr. UFS2
Comment 2 Alexander Best freebsd_committer freebsd_triage 2010-08-21 00:13:12 UTC
State Changed
From-To: open->analyzed

The originator of the PR described the problem very accurately. 

However the location where the default max-extent-size gets set has moved from 
/usr/src/sbin/newfs/newfs.c to usr.sbin/newfs/mkfs.c: 

224 	if (maxbsize == 0) 
225 		maxbsize = bsize; 
226 	if (maxbsize < bsize || !POWEROF2(maxbsize)) { 
227 		sblock.fs_maxbsize = sblock.fs_bsize; 
228 		printf("Extent size set to %dn", sblock.fs_maxbsize); 
229 	} else if (sblock.fs_maxbsize > FS_MAXCONTIG * sblock.fs_bsize) { 
230 		sblock.fs_maxbsize = FS_MAXCONTIG * sblock.fs_bsize; 
231 		printf("Extent size reduced to %dn", sblock.fs_maxbsize); 
232 	} else { 
233 		sblock.fs_maxbsize = maxbsize; 
234 	} 

I'll submit a patch for newfs(8) right away. 


Comment 3 Alexander Best freebsd_committer freebsd_triage 2010-08-21 00:13:12 UTC
Responsible Changed
From-To: mckusick->freebsd-fs

Over to maintainer(s).
Comment 4 Alexander Best freebsd_committer freebsd_triage 2010-08-21 00:39:38 UTC
This patch should sync the newfs code with newfs(8).

cheers.
alex

-- 
a13x
Comment 5 Alexander Best freebsd_committer freebsd_triage 2010-08-21 12:05:10 UTC
Class Changed
From-To: sw-bug->doc-bug

This is not a sw-bug.
Comment 6 Alexander Best freebsd_committer freebsd_triage 2010-08-25 00:40:24 UTC
to the person committing the patch to the newfs(8) manual:

please bump the date to "August 20, 2010".

thanks.
alex

-- 
a13x
Comment 7 Glen Barber freebsd_committer freebsd_triage 2010-09-13 13:59:45 UTC
Responsible Changed
From-To: freebsd-fs->gjb

I'll take this.
Comment 8 dfilter service freebsd_committer freebsd_triage 2010-09-14 13:12:13 UTC
Author: gjb (doc committer)
Date: Tue Sep 14 12:12:07 2010
New Revision: 212610
URL: http://svn.freebsd.org/changeset/base/212610

Log:
  Synchronize newfs(8) manual with code.
  
  PR:		61716
  Submitted by:	Radim Kolar <hsn at netmag cz>
  Patch by:	arundel
  Approved by:	keramida (mentor)
  MFC after:	1 week

Modified:
  head/sbin/newfs/newfs.8

Modified: head/sbin/newfs/newfs.8
==============================================================================
--- head/sbin/newfs/newfs.8	Tue Sep 14 11:42:07 2010	(r212609)
+++ head/sbin/newfs/newfs.8	Tue Sep 14 12:12:07 2010	(r212610)
@@ -28,7 +28,7 @@
 .\"     @(#)newfs.8	8.6 (Berkeley) 5/3/95
 .\" $FreeBSD$
 .\"
-.Dd March 21, 2008
+.Dd September 14, 2010
 .Dt NEWFS 8
 .Os
 .Sh NAME
@@ -125,8 +125,9 @@ and the number of bytes per inode.
 .It Fl d Ar max-extent-size
 The file system may choose to store large files using extents.
 This parameter specifies the largest extent size that may be used.
-It is presently limited to its default value which is 16 times
-the file system blocksize.
+The default value is the file system blocksize.
+It is presently limited to a maximum value of 16 times the
+file system blocksize and a minimum value of the file system blocksize.
 .It Fl e Ar maxbpg
 Indicate the maximum number of blocks any single file can
 allocate out of a cylinder group before it is forced to begin
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 9 Glen Barber freebsd_committer freebsd_triage 2010-09-14 13:12:22 UTC
State Changed
From-To: analyzed->patched

Patched in HEAD.  MFC in 1 week.
Comment 10 dfilter service freebsd_committer freebsd_triage 2011-02-07 19:12:35 UTC
Author: gjb (doc committer)
Date: Mon Feb  7 19:12:30 2011
New Revision: 218412
URL: http://svn.freebsd.org/changeset/base/218412

Log:
  MFC 212610:
  Synchronize newfs(8) manual with code.
  
  PR:		61716
  Approved by:	keramida (mentor)

Modified:
  stable/8/sbin/newfs/newfs.8
Directory Properties:
  stable/8/sbin/newfs/   (props changed)

Modified: stable/8/sbin/newfs/newfs.8
==============================================================================
--- stable/8/sbin/newfs/newfs.8	Mon Feb  7 18:10:18 2011	(r218411)
+++ stable/8/sbin/newfs/newfs.8	Mon Feb  7 19:12:30 2011	(r218412)
@@ -125,8 +125,9 @@ and the number of bytes per inode.
 .It Fl d Ar max-extent-size
 The file system may choose to store large files using extents.
 This parameter specifies the largest extent size that may be used.
-It is presently limited to its default value which is 16 times
-the file system blocksize.
+The default value is the file system blocksize.
+It is presently limited to a maximum value of 16 times the
+file system blocksize and a minimum value of the file system blocksize.
 .It Fl e Ar maxbpg
 Indicate the maximum number of blocks any single file can
 allocate out of a cylinder group before it is forced to begin
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 11 dfilter service freebsd_committer freebsd_triage 2011-02-07 19:13:26 UTC
Author: gjb (doc committer)
Date: Mon Feb  7 19:13:20 2011
New Revision: 218413
URL: http://svn.freebsd.org/changeset/base/218413

Log:
  MFC 212610:
  Synchronize newfs(8) manual with code.
  
  PR:		61716
  Approved by:	keramida (mentor)

Modified:
  stable/7/sbin/newfs/newfs.8
Directory Properties:
  stable/7/sbin/newfs/   (props changed)

Modified: stable/7/sbin/newfs/newfs.8
==============================================================================
--- stable/7/sbin/newfs/newfs.8	Mon Feb  7 19:12:30 2011	(r218412)
+++ stable/7/sbin/newfs/newfs.8	Mon Feb  7 19:13:20 2011	(r218413)
@@ -28,7 +28,7 @@
 .\"     @(#)newfs.8	8.6 (Berkeley) 5/3/95
 .\" $FreeBSD$
 .\"
-.Dd March 21, 2008
+.Dd September 14, 2010
 .Dt NEWFS 8
 .Os
 .Sh NAME
@@ -116,8 +116,9 @@ and the number of bytes per inode.
 .It Fl d Ar max-extent-size
 The file system may choose to store large files using extents.
 This parameter specifies the largest extent size that may be used.
-It is presently limited to its default value which is 16 times
-the file system blocksize.
+The default value is the file system blocksize.
+It is presently limited to a maximum value of 16 times the
+file system blocksize and a minimum value of the file system blocksize.
 .It Fl e Ar maxbpg
 Indicate the maximum number of blocks any single file can
 allocate out of a cylinder group before it is forced to begin
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 12 Glen Barber freebsd_committer freebsd_triage 2011-02-07 19:13:28 UTC
State Changed
From-To: patched->closed

MFC'd to stable/8 and stable/7.  Thanks!