From 0750e3e86451d76b599bad457e005e92b1dd9c60 Mon Sep 17 00:00:00 2001 From: mckusick Date: Thu, 16 May 2013 19:39:11 +0000 Subject: Clean up trailing whitespace. Submitted by: Andy Kosela MFC after: 1 week --- sbin/dumpfs/dumpfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sbin/dumpfs') diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 6669d53..d04558c 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -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, -- cgit v1.1 From 31f4b526a608382b0969c11ebab85aabd2f06b35 Mon Sep 17 00:00:00 2001 From: mckusick Date: Thu, 16 May 2013 20:07:08 +0000 Subject: 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 Submitted by: Andy Kosela MFC after: 1 week --- sbin/dumpfs/dumpfs.8 | 23 ++++++++++++++++++++++- sbin/dumpfs/dumpfs.c | 7 +++++-- 2 files changed, 27 insertions(+), 3 deletions(-) (limited to 'sbin/dumpfs') diff --git a/sbin/dumpfs/dumpfs.8 b/sbin/dumpfs/dumpfs.8 index 858881a..feb8758 100644 --- a/sbin/dumpfs/dumpfs.8 +++ b/sbin/dumpfs/dumpfs.8 @@ -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 , diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index d04558c..baf3d99 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -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 "); -- cgit v1.1