From 5a9dc069e0c7292a0412d1beb484da63f5be048e Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Tue, 31 Oct 2006 22:02:24 +0000 Subject: [PATCH] Teach about new fields (cg_unrefs and fs_unrefs) and new FS_GJOURNAL flag. Sponsored by: home.pl --- sbin/dumpfs/dumpfs.c | 14 +++++++++----- sbin/growfs/debug.c | 3 +++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 325cdcbf9864..e0b809e1b5e0 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -168,8 +168,9 @@ dumpfs(const char *name) (intmax_t)afs.fs_cstotal.cs_ndir, (intmax_t)afs.fs_cstotal.cs_nifree, (intmax_t)afs.fs_cstotal.cs_nffree); - printf("bpg\t%d\tfpg\t%d\tipg\t%d\n", - afs.fs_fpg / afs.fs_frag, afs.fs_fpg, afs.fs_ipg); + 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, (uintmax_t)afs.fs_maxfilesize); @@ -228,10 +229,12 @@ dumpfs(const char *name) printf("acls "); if (fsflags & FS_MULTILABEL) printf("multilabel "); + if (fsflags & FS_GJOURNAL) + printf("gjournal "); if (fsflags & FS_FLAGS_UPDATED) printf("fs_flags expanded "); fsflags &= ~(FS_UNCLEAN | FS_DOSOFTDEP | FS_NEEDSFSCK | FS_INDEXDIRS | - FS_ACLS | FS_MULTILABEL | FS_FLAGS_UPDATED); + FS_ACLS | FS_MULTILABEL | FS_GJOURNAL | FS_FLAGS_UPDATED); if (fsflags != 0) printf("unknown flags (%#x)", fsflags); putchar('\n'); @@ -282,8 +285,9 @@ dumpcg(void) cgtime = acg.cg_time; printf("magic\t%x\ttell\t%jx\ttime\t%s", acg.cg_magic, (intmax_t)cur, ctime(&cgtime)); - printf("cgx\t%d\tndblk\t%d\tniblk\t%d\tinitiblk %d\n", - acg.cg_cgx, acg.cg_ndblk, acg.cg_niblk, acg.cg_initediblk); + printf("cgx\t%d\tndblk\t%d\tniblk\t%d\tinitiblk %d\tunrefs %d\n", + acg.cg_cgx, acg.cg_ndblk, acg.cg_niblk, acg.cg_initediblk, + acg.cg_unrefs); break; case 1: cgtime = acg.cg_old_time; diff --git a/sbin/growfs/debug.c b/sbin/growfs/debug.c index d97fae31af88..15effec81587 100644 --- a/sbin/growfs/debug.c +++ b/sbin/growfs/debug.c @@ -281,6 +281,8 @@ dbg_dump_fs(struct fs *sb, const char *comment) */ fprintf(dbg_log, "maxbsize int32_t 0x%08x\n", sb->fs_maxbsize); + fprintf(dbg_log, "unrefs int64_t 0x%08x\n", + sb->fs_unrefs); fprintf(dbg_log, "sblockloc int64_t 0x%08x%08x\n", ((unsigned int *)&(sb->fs_sblockloc))[1], ((unsigned int *)&(sb->fs_sblockloc))[0]); @@ -399,6 +401,7 @@ dbg_dump_cg(const char *comment, struct cg *cgr) cgr->cg_nclusterblks); fprintf(dbg_log, "niblk int32_t 0x%08x\n", cgr->cg_niblk); fprintf(dbg_log, "initediblk int32_t 0x%08x\n", cgr->cg_initediblk); + fprintf(dbg_log, "unrefs int32_t 0x%08x\n", cgr->cg_unrefs); fprintf(dbg_log, "time ufs_time_t %10u\n", (unsigned int)cgr->cg_initediblk);