Date: Sun, 4 Dec 2022 06:53:56 GMT From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 001fd6b05a57 - stable/13 - Additional diagnostic output when running fsck_ffs with debugging flag (-d) Message-ID: <202212040653.2B46rudg072270@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=001fd6b05a57234208be67fcf4262f21d1dee408 commit 001fd6b05a57234208be67fcf4262f21d1dee408 Author: Kirk McKusick <mckusick@FreeBSD.org> AuthorDate: 2022-10-30 21:59:44 +0000 Commit: Kirk McKusick <mckusick@FreeBSD.org> CommitDate: 2022-12-04 06:14:31 +0000 Additional diagnostic output when running fsck_ffs with debugging flag (-d) (cherry picked from commit 595746df6fe946363233bd3eb73abe34e4457359) Sponsored by: The FreeBSD Foundation --- sbin/fsck_ffs/pass5.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c index 324e725929f6..61be54ed54ed 100644 --- a/sbin/fsck_ffs/pass5.c +++ b/sbin/fsck_ffs/pass5.c @@ -375,6 +375,22 @@ pass5(void) if (cursnapshot == 0 && memcmp(&cstotal, &fs->fs_cstotal, sizeof cstotal) != 0 && dofix(&idesc[0], "SUMMARY BLK COUNT(S) WRONG IN SUPERBLK")) { + if (debug) { + printf("cstotal is currently: %jd dirs, %jd blks free, " + "%jd frags free, %jd inos free, %jd clusters\n", + (intmax_t)fs->fs_cstotal.cs_ndir, + (intmax_t)fs->fs_cstotal.cs_nbfree, + (intmax_t)fs->fs_cstotal.cs_nffree, + (intmax_t)fs->fs_cstotal.cs_nifree, + (intmax_t)fs->fs_cstotal.cs_numclusters); + printf("cstotal ought to be: %jd dirs, %jd blks free, " + "%jd frags free, %jd inos free, %jd clusters\n", + (intmax_t)cstotal.cs_ndir, + (intmax_t)cstotal.cs_nbfree, + (intmax_t)cstotal.cs_nffree, + (intmax_t)cstotal.cs_nifree, + (intmax_t)cstotal.cs_numclusters); + } memmove(&fs->fs_cstotal, &cstotal, sizeof cstotal); fs->fs_ronly = 0; fs->fs_fmod = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212040653.2B46rudg072270>