From nobody@FreeBSD.org  Tue Jan 10 20:34:54 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3CA00106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 10 Jan 2012 20:34:54 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 2C4F78FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 10 Jan 2012 20:34:54 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q0AKYrT4059998
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 10 Jan 2012 20:34:53 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q0AKYrcr059997;
	Tue, 10 Jan 2012 20:34:53 GMT
	(envelope-from nobody)
Message-Id: <201201102034.q0AKYrcr059997@red.freebsd.org>
Date: Tue, 10 Jan 2012 20:34:53 GMT
From: Dieter <freebsd@sopwith.solgatos.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: dumpfs -m is broken
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         163992
>Category:       bin
>Synopsis:       [patch] dumpfs(8): dumpfs -m is broken
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mckusick
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 10 20:40:06 UTC 2012
>Closed-Date:    Mon May 27 22:48:14 UTC 2013
>Last-Modified:  Mon May 27 22:50:00 UTC 2013
>Originator:     Dieter
>Release:        8.2
>Organization:
>Environment:
8.2 amd64
>Description:
The dumpfs man page promises:

"If -m is specified, a newfs(8) command is printed that can be used to
generate a new file system with equivalent settings."

However, this is a lie.  Dumpfs -m does not supply the -i option,
so the new file system reverts to the default number of inodes.

dumpfs.c says: /* -i is dumb */
The default number of inodes is rarely optimum.  In most cases I have to
greatly reduce the number of inodes.  This frees up some disk space and
reduces fsck time.  In very rare cases I have had to increase the number
of inodes.  In what universe is making more efficient use of disk space
and reducing fsck time dumb?

Might want to look at the other options as well.  For example -r looks kinda
important if one is using it.

Very disappointing.  Not what I was expecting from the best of breed.  :-(

>How-To-Repeat:
Run newfs with -i to get non-default number of inodes.
Run dumpfs -m.
Run the newfs command that dumpfs gives.
Note that you get the wrong number of inodes.
Redo several days work.  :-(

>Fix:


>Release-Note:
>Audit-Trail:

From: Andy Kosela <akosela@andykosela.com>
To: bug-followup@freebsd.org
Cc: freebsd@sopwith.solgatos.com
Subject: Re: bin/163992: dumpfs(8): dumpfs -m is broken
Date: Thu, 06 Dec 2012 21:19:04 +0100

 This is a multi-part message in MIME format.
 
 --=_50c0fdb8.llS4mBD6t3PrprtFlk3TrGmzKqrbSQX0aw5WEeZ+SgpjW30k
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 I consider this a bug.  Can you test the following patch?
 
 Thanks,
 
 --Andy
 
 --=_50c0fdb8.llS4mBD6t3PrprtFlk3TrGmzKqrbSQX0aw5WEeZ+SgpjW30k
 Content-Type: text/plain;
  charset=us-ascii
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="patch.txt"
 
 Index: dumpfs.c
 ===================================================================
 --- dumpfs.c	(revision 243937)
 +++ dumpfs.c	(working copy)
 @@ -417,7 +417,8 @@
  	printf("-f %d ", fs->fs_fsize);
  	printf("-g %d ", fs->fs_avgfilesize);
  	printf("-h %d ", fs->fs_avgfpdir);
 -	/* -i is dumb */
 +	printf("-i %d ", fs->fs_fsize * ((((fs->fs_fpg / fs->fs_frag) *
 +	    fs->fs_bsize) / fs->fs_ipg) / fs->fs_fsize + 1));
  	if (fs->fs_flags & FS_SUJ)
  		printf("-j ");
  	if (fs->fs_flags & FS_GJOURNAL)
 
 --=_50c0fdb8.llS4mBD6t3PrprtFlk3TrGmzKqrbSQX0aw5WEeZ+SgpjW30k--

From: "Dieter BSD" <dieterbsd@engineer.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: bin/163992: dumpfs(8): dumpfs -m is broken
Date: Mon, 17 Dec 2012 16:48:25 -0500

 newfs -e 100000000 -b 65536 -f 8192 -g 67108864 -h 16 -i 67108864
  -U -o space -L ${DISK_NUM}data /dev/${DISK_PORT}
 
 newfs says:
 
 density reduced from 67108864 to 14860288
 /dev/ada12: 2861588.5MB (5860533168 sectors) block size 65536,
  fragment size 8192
         using 789 cylinder groups of 3628.00MB, 58048 blks, 256 inodes.
         with soft updates
 super-block backups (for fsck -b #) at:
  256, 7430400, 14860544, 22290688, 29720832, [ ... ]
 
 The new dumpfs says:
 
 newfs -L 71data -O 2 -U -a 2 -b 65536 -d 65536 -e 100000000 -f 8192
  -g 67108864 -h 16 -i 14868480 -m 8 -o space -s 5860533168 /dev/ufs/71data
 
 A definite improvement,  Thank you.
 
 However...
 The -i argument is off by 8K.
 At least it is off in the desired direction. :-)
 
 The -a 2 is troubling since the default is supposed to be 16 [1].
 And is a rotational delay still desirable with modern disks?
 (large on-disk buffers, variable number of sectors/track, ...)
 I've posted a query about this to the fs and performance lists.
 
 -d is supposed to default to 16 times the file system blocksize [1].
 
 [1] According to the newfs man page.
Responsible-Changed-From-To: freebsd-bugs->mckusick 
Responsible-Changed-By: mckusick 
Responsible-Changed-When: Thu May 2 19:28:13 UTC 2013 
Responsible-Changed-Why:  
I will take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163992 

From: Andy Kosela <akosela@andykosela.com>
To: bug-followup@freebsd.org
Cc: mckusick@mckusick.com, dieterbsd@engineer.com,
 akosela@andykosela.com
Subject: Re: bin/163992: [patch] dumpfs(8): dumpfs -m is broken
Date: Thu, 16 May 2013 13:44:48 -0500

 This is a multi-part message in MIME format.
 
 --=_51952920.8NING3trP2klL9X9SAJGQDONyxQ7lcS/jCzBVCIy2GbjoCIf
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 I refined this patch a little bit, and also implemented some more
 missing options and updated man page.
 
 Dieter, the -i calculation is not wrong -- try to count the total number
 of inodes and you will see the density parameter is right.
 
 Kirk, as we already spoke, the patch is all yours now.  :)
 
 --Andy
 
 --=_51952920.8NING3trP2klL9X9SAJGQDONyxQ7lcS/jCzBVCIy2GbjoCIf
 Content-Type: text/plain;
  charset=us-ascii
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="patch.txt"
 
 Index: dumpfs.c
 ===================================================================
 --- dumpfs.c	(revision 250706)
 +++ dumpfs.c	(working copy)
 @@ -197,15 +197,15 @@
  		    "maxbsize", afs.fs_maxbsize, afs.fs_maxbpg,
  		    afs.fs_maxcontig, afs.fs_contigsumsize);
  		printf("nbfree\t%jd\tndir\t%jd\tnifree\t%jd\tnffree\t%jd\n",
 -		    (intmax_t)afs.fs_cstotal.cs_nbfree, 
 +		    (intmax_t)afs.fs_cstotal.cs_nbfree,
  		    (intmax_t)afs.fs_cstotal.cs_ndir,
 -		    (intmax_t)afs.fs_cstotal.cs_nifree, 
 +		    (intmax_t)afs.fs_cstotal.cs_nifree,
  		    (intmax_t)afs.fs_cstotal.cs_nffree);
  		printf("bpg\t%d\tfpg\t%d\tipg\t%d\tunrefs\t%jd\n",
  		    afs.fs_fpg / afs.fs_frag, afs.fs_fpg, afs.fs_ipg,
  		    (intmax_t)afs.fs_unrefs);
  		printf("nindir\t%d\tinopb\t%d\tmaxfilesize\t%ju\n",
 -		    afs.fs_nindir, afs.fs_inopb, 
 +		    afs.fs_nindir, afs.fs_inopb,
  		    (uintmax_t)afs.fs_maxfilesize);
  		printf("sbsize\t%d\tcgsize\t%d\tcsaddr\t%jd\tcssize\t%d\n",
  		    afs.fs_sbsize, afs.fs_cgsize, (intmax_t)afs.fs_csaddr,
 @@ -417,12 +417,15 @@
  	printf("-f %d ", fs->fs_fsize);
  	printf("-g %d ", fs->fs_avgfilesize);
  	printf("-h %d ", fs->fs_avgfpdir);
 -	/* -i is dumb */
 +	printf("-i %jd ", fragroundup(fs, lblktosize(fs, fragstoblks(fs,
 +	    fs->fs_fpg)) / fs->fs_ipg));
  	if (fs->fs_flags & FS_SUJ)
  		printf("-j ");
  	if (fs->fs_flags & FS_GJOURNAL)
  		printf("-J ");
 -	/* -k..l unimplemented */
 +	printf("-k %jd ", fs->fs_metaspace);
 +	if (fs->fs_flags & FS_MULTILABEL)
 +		printf("-l ");
  	printf("-m %d ", fs->fs_minfree);
  	/* -n unimplemented */
  	printf("-o ");
 Index: dumpfs.8
 ===================================================================
 --- dumpfs.8	(revision 250706)
 +++ dumpfs.8	(working copy)
 @@ -28,7 +28,7 @@
  .\"     @(#)dumpfs.8	8.1 (Berkeley) 6/5/93
  .\" $FreeBSD$
  .\"
 -.Dd Jul 14, 2011
 +.Dd May 16, 2013
  .Dt DUMPFS 8
  .Os
  .Sh NAME
 @@ -76,6 +76,9 @@
  .Xr newfs 8
  command is printed that can be used to generate a new file system
  with equivalent settings.
 +Please note that -E, -R, -S, and -T options are not handled here and -p is 
 +not useful in this case so we omit it either.
 +Options -n and -r are currently not implemented.
  .Sh SEE ALSO
  .Xr disktab 5 ,
  .Xr fs 5 ,
 
 --=_51952920.8NING3trP2klL9X9SAJGQDONyxQ7lcS/jCzBVCIy2GbjoCIf--

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/163992: commit references a PR
Date: Thu, 16 May 2013 20:07:16 +0000 (UTC)

 Author: mckusick
 Date: Thu May 16 20:07:08 2013
 New Revision: 250710
 URL: http://svnweb.freebsd.org/changeset/base/250710
 
 Log:
   When running the -m option to generate a newfs(8) command suitable for
   recreating the filesystem, check for and output the -i, -k, and -l
   options if appropriate.
   
   Note the remaining deficiencies of the -m option in the dumpfs(8)
   manual page. Specifically that newfs(8) options -E, -R, -S, and -T
   options are not handled and that -p is not useful so is omitted.
   Also document that newfs(8) options -n and -r are neither checked
   for nor output but should be. The -r flag is needed if the filesystem
   uses gjournal(8).
   
   PR:           bin/163992
   Reported by:  Dieter <freebsd@sopwith.solgatos.com>
   Submitted by: Andy Kosela <akosela@andykosela.com>
   MFC after:    1 week
 
 Modified:
   head/sbin/dumpfs/dumpfs.8
   head/sbin/dumpfs/dumpfs.c
 
 Modified: head/sbin/dumpfs/dumpfs.8
 ==============================================================================
 --- head/sbin/dumpfs/dumpfs.8	Thu May 16 19:44:51 2013	(r250709)
 +++ head/sbin/dumpfs/dumpfs.8	Thu May 16 20:07:08 2013	(r250710)
 @@ -28,7 +28,7 @@
  .\"     @(#)dumpfs.8	8.1 (Berkeley) 6/5/93
  .\" $FreeBSD$
  .\"
 -.Dd Jul 14, 2011
 +.Dd May 16, 2013
  .Dt DUMPFS 8
  .Os
  .Sh NAME
 @@ -76,6 +76,27 @@ is specified, a
  .Xr newfs 8
  command is printed that can be used to generate a new file system
  with equivalent settings.
 +Please note that
 +.Xr newfs 8
 +options
 +.Fl E ,
 +.Fl R ,
 +.Fl S ,
 +and
 +.Fl T
 +are not handled and
 +.Fl p
 +is not useful in this case so is omitted.
 +.Xr Newfs 8
 +options
 +.Fl n
 +and
 +.Fl r
 +are neither checked for nor output but should be.
 +The
 +.Fl r
 +flag is needed if the filesystem uses
 +.Xr gjournal 8 .
  .Sh SEE ALSO
  .Xr disktab 5 ,
  .Xr fs 5 ,
 
 Modified: head/sbin/dumpfs/dumpfs.c
 ==============================================================================
 --- head/sbin/dumpfs/dumpfs.c	Thu May 16 19:44:51 2013	(r250709)
 +++ head/sbin/dumpfs/dumpfs.c	Thu May 16 20:07:08 2013	(r250710)
 @@ -417,12 +417,15 @@ marshal(const char *name)
  	printf("-f %d ", fs->fs_fsize);
  	printf("-g %d ", fs->fs_avgfilesize);
  	printf("-h %d ", fs->fs_avgfpdir);
 -	/* -i is dumb */
 +	printf("-i %jd ", fragroundup(fs, lblktosize(fs, fragstoblks(fs,
 +	    fs->fs_fpg)) / fs->fs_ipg));
  	if (fs->fs_flags & FS_SUJ)
  		printf("-j ");
  	if (fs->fs_flags & FS_GJOURNAL)
  		printf("-J ");
 -	/* -k..l unimplemented */
 +	printf("-k %jd ", fs->fs_metaspace);
 +	if (fs->fs_flags & FS_MULTILABEL)
 +		printf("-l ");
  	printf("-m %d ", fs->fs_minfree);
  	/* -n unimplemented */
  	printf("-o ");
 _______________________________________________
 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"
 
State-Changed-From-To: open->patched 
State-Changed-By: mckusick 
State-Changed-When: Thu May 16 21:02:30 UTC 2013 
State-Changed-Why:  
Fix has been applied to HEAD. Will MFC in 2 weeks if no problems 
are reported. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163992 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/163992: commit references a PR
Date: Mon, 27 May 2013 22:18:23 +0000 (UTC)

 Author: mckusick
 Date: Mon May 27 22:18:04 2013
 New Revision: 251043
 URL: http://svnweb.freebsd.org/changeset/base/251043
 
 Log:
   MFC of 250708:
   
   Clean up trailing whitespace.
   
   Submitted by: Andy Kosela
   
   MFC of 250710:
   
   When running the -m option to generate a newfs(8) command suitable for
   recreating the filesystem, check for and output the -i, -k, and -l
   options if appropriate.
   
   Note the remaining deficiencies of the -m option in the dumpfs(8)
   manual page. Specifically that newfs(8) options -E, -R, -S, and -T
   options are not handled and that -p is not useful so is omitted.
   Also document that newfs(8) options -n and -r are neither checked
   for nor output but should be. The -r flag is needed if the filesystem
   uses gjournal(8).
   
   PR:           bin/163992
   Reported by:  Dieter <freebsd@sopwith.solgatos.com>
   Submitted by: Andy Kosela <akosela@andykosela.com>
 
 Modified:
   stable/9/sbin/dumpfs/dumpfs.8
   stable/9/sbin/dumpfs/dumpfs.c
 Directory Properties:
   stable/9/sbin/dumpfs/   (props changed)
 
 Modified: stable/9/sbin/dumpfs/dumpfs.8
 ==============================================================================
 --- stable/9/sbin/dumpfs/dumpfs.8	Mon May 27 21:37:19 2013	(r251042)
 +++ stable/9/sbin/dumpfs/dumpfs.8	Mon May 27 22:18:04 2013	(r251043)
 @@ -28,7 +28,7 @@
  .\"     @(#)dumpfs.8	8.1 (Berkeley) 6/5/93
  .\" $FreeBSD$
  .\"
 -.Dd Jul 14, 2011
 +.Dd May 16, 2013
  .Dt DUMPFS 8
  .Os
  .Sh NAME
 @@ -76,6 +76,27 @@ is specified, a
  .Xr newfs 8
  command is printed that can be used to generate a new file system
  with equivalent settings.
 +Please note that
 +.Xr newfs 8
 +options
 +.Fl E ,
 +.Fl R ,
 +.Fl S ,
 +and
 +.Fl T
 +are not handled and
 +.Fl p
 +is not useful in this case so is omitted.
 +.Xr Newfs 8
 +options
 +.Fl n
 +and
 +.Fl r
 +are neither checked for nor output but should be.
 +The
 +.Fl r
 +flag is needed if the filesystem uses
 +.Xr gjournal 8 .
  .Sh SEE ALSO
  .Xr disktab 5 ,
  .Xr fs 5 ,
 
 Modified: stable/9/sbin/dumpfs/dumpfs.c
 ==============================================================================
 --- stable/9/sbin/dumpfs/dumpfs.c	Mon May 27 21:37:19 2013	(r251042)
 +++ stable/9/sbin/dumpfs/dumpfs.c	Mon May 27 22:18:04 2013	(r251043)
 @@ -197,15 +197,15 @@ dumpfs(const char *name)
  		    "maxbsize", afs.fs_maxbsize, afs.fs_maxbpg,
  		    afs.fs_maxcontig, afs.fs_contigsumsize);
  		printf("nbfree\t%jd\tndir\t%jd\tnifree\t%jd\tnffree\t%jd\n",
 -		    (intmax_t)afs.fs_cstotal.cs_nbfree, 
 +		    (intmax_t)afs.fs_cstotal.cs_nbfree,
  		    (intmax_t)afs.fs_cstotal.cs_ndir,
 -		    (intmax_t)afs.fs_cstotal.cs_nifree, 
 +		    (intmax_t)afs.fs_cstotal.cs_nifree,
  		    (intmax_t)afs.fs_cstotal.cs_nffree);
  		printf("bpg\t%d\tfpg\t%d\tipg\t%d\tunrefs\t%jd\n",
  		    afs.fs_fpg / afs.fs_frag, afs.fs_fpg, afs.fs_ipg,
  		    (intmax_t)afs.fs_unrefs);
  		printf("nindir\t%d\tinopb\t%d\tmaxfilesize\t%ju\n",
 -		    afs.fs_nindir, afs.fs_inopb, 
 +		    afs.fs_nindir, afs.fs_inopb,
  		    (uintmax_t)afs.fs_maxfilesize);
  		printf("sbsize\t%d\tcgsize\t%d\tcsaddr\t%jd\tcssize\t%d\n",
  		    afs.fs_sbsize, afs.fs_cgsize, (intmax_t)afs.fs_csaddr,
 @@ -417,12 +417,15 @@ marshal(const char *name)
  	printf("-f %d ", fs->fs_fsize);
  	printf("-g %d ", fs->fs_avgfilesize);
  	printf("-h %d ", fs->fs_avgfpdir);
 -	/* -i is dumb */
 +	printf("-i %jd ", fragroundup(fs, lblktosize(fs, fragstoblks(fs,
 +	    fs->fs_fpg)) / fs->fs_ipg));
  	if (fs->fs_flags & FS_SUJ)
  		printf("-j ");
  	if (fs->fs_flags & FS_GJOURNAL)
  		printf("-J ");
 -	/* -k..l unimplemented */
 +	printf("-k %jd ", fs->fs_metaspace);
 +	if (fs->fs_flags & FS_MULTILABEL)
 +		printf("-l ");
  	printf("-m %d ", fs->fs_minfree);
  	/* -n unimplemented */
  	printf("-o ");
 _______________________________________________
 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"
 
State-Changed-From-To: patched->closed 
State-Changed-By: mckusick 
State-Changed-When: Mon May 27 22:46:13 UTC 2013 
State-Changed-Why:  
Patch has been MFC'ed to 9-stable (-r 251043) and 8-stable (-r 251045). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163992 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/163992: commit references a PR
Date: Mon, 27 May 2013 22:41:52 +0000 (UTC)

 Author: mckusick
 Date: Mon May 27 22:41:43 2013
 New Revision: 251045
 URL: http://svnweb.freebsd.org/changeset/base/251045
 
 Log:
   MFC of 250708:
   
   Clean up trailing whitespace.
   
   Submitted by: Andy Kosela
   
   MFC of 250710: (delete addition of -k which does not exist in 8-stable)
   
   When running the -m option to generate a newfs(8) command suitable for
   recreating the filesystem, check for and output the -i, -k, and -l
   options if appropriate.
   
   Note the remaining deficiencies of the -m option in the dumpfs(8)
   manual page. Specifically that newfs(8) options -E, -R, -S, and -T
   options are not handled and that -p is not useful so is omitted.
   Also document that newfs(8) options -n and -r are neither checked
   for nor output but should be. The -r flag is needed if the filesystem
   uses gjournal(8).
   
   PR:           bin/163992
   Reported by:  Dieter <freebsd@sopwith.solgatos.com>
   Submitted by: Andy Kosela <akosela@andykosela.com>
 
 Modified:
   stable/8/sbin/dumpfs/dumpfs.8
   stable/8/sbin/dumpfs/dumpfs.c
 Directory Properties:
   stable/8/sbin/dumpfs/   (props changed)
 
 Modified: stable/8/sbin/dumpfs/dumpfs.8
 ==============================================================================
 --- stable/8/sbin/dumpfs/dumpfs.8	Mon May 27 22:19:01 2013	(r251044)
 +++ stable/8/sbin/dumpfs/dumpfs.8	Mon May 27 22:41:43 2013	(r251045)
 @@ -28,7 +28,7 @@
  .\"     @(#)dumpfs.8	8.1 (Berkeley) 6/5/93
  .\" $FreeBSD$
  .\"
 -.Dd Jul 14, 2011
 +.Dd May 16, 2013
  .Dt DUMPFS 8
  .Os
  .Sh NAME
 @@ -76,6 +76,27 @@ is specified, a
  .Xr newfs 8
  command is printed that can be used to generate a new file system
  with equivalent settings.
 +Please note that
 +.Xr newfs 8
 +options
 +.Fl E ,
 +.Fl R ,
 +.Fl S ,
 +and
 +.Fl T
 +are not handled and
 +.Fl p
 +is not useful in this case so is omitted.
 +.Xr Newfs 8
 +options
 +.Fl n
 +and
 +.Fl r
 +are neither checked for nor output but should be.
 +The
 +.Fl r
 +flag is needed if the filesystem uses
 +.Xr gjournal 8 .
  .Sh SEE ALSO
  .Xr disktab 5 ,
  .Xr fs 5 ,
 
 Modified: stable/8/sbin/dumpfs/dumpfs.c
 ==============================================================================
 --- stable/8/sbin/dumpfs/dumpfs.c	Mon May 27 22:19:01 2013	(r251044)
 +++ stable/8/sbin/dumpfs/dumpfs.c	Mon May 27 22:41:43 2013	(r251045)
 @@ -197,15 +197,15 @@ dumpfs(const char *name)
  		    "maxbsize", afs.fs_maxbsize, afs.fs_maxbpg,
  		    afs.fs_maxcontig, afs.fs_contigsumsize);
  		printf("nbfree\t%jd\tndir\t%jd\tnifree\t%jd\tnffree\t%jd\n",
 -		    (intmax_t)afs.fs_cstotal.cs_nbfree, 
 +		    (intmax_t)afs.fs_cstotal.cs_nbfree,
  		    (intmax_t)afs.fs_cstotal.cs_ndir,
 -		    (intmax_t)afs.fs_cstotal.cs_nifree, 
 +		    (intmax_t)afs.fs_cstotal.cs_nifree,
  		    (intmax_t)afs.fs_cstotal.cs_nffree);
  		printf("bpg\t%d\tfpg\t%d\tipg\t%d\tunrefs\t%jd\n",
  		    afs.fs_fpg / afs.fs_frag, afs.fs_fpg, afs.fs_ipg,
  		    (intmax_t)afs.fs_unrefs);
  		printf("nindir\t%d\tinopb\t%d\tmaxfilesize\t%ju\n",
 -		    afs.fs_nindir, afs.fs_inopb, 
 +		    afs.fs_nindir, afs.fs_inopb,
  		    (uintmax_t)afs.fs_maxfilesize);
  		printf("sbsize\t%d\tcgsize\t%d\tcsaddr\t%jd\tcssize\t%d\n",
  		    afs.fs_sbsize, afs.fs_cgsize, (intmax_t)afs.fs_csaddr,
 @@ -416,8 +416,13 @@ marshal(const char *name)
  	printf("-f %d ", fs->fs_fsize);
  	printf("-g %d ", fs->fs_avgfilesize);
  	printf("-h %d ", fs->fs_avgfpdir);
 -	/* -i is dumb */
 -	/* -j..l unimplemented */
 +	printf("-i %jd ", fragroundup(fs, lblktosize(fs, fragstoblks(fs,
 +	    fs->fs_fpg)) / fs->fs_ipg));
 +	/* -j..k unimplemented */
 +	if (fs->fs_flags & FS_GJOURNAL)
 +		printf("-J ");
 +	if (fs->fs_flags & FS_MULTILABEL)
 +		printf("-l ");
  	printf("-m %d ", fs->fs_minfree);
  	/* -n unimplemented */
  	printf("-o ");
 _______________________________________________
 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"
 
>Unformatted:
