Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 May 2013 20:07:09 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r250710 - head/sbin/dumpfs
Message-ID:  <201305162007.r4GK79bm092123@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 ");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305162007.r4GK79bm092123>