From nobody Sun Oct 30 22:01:00 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N0qwr2XFlz4gjbl; Sun, 30 Oct 2022 22:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N0qwr27Pbz42R9; Sun, 30 Oct 2022 22:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667167260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mJ3AiKB5p8DwKfvRwFNywjy2N9Vg02iqJjEVasUDd6U=; b=saIUi1hhG5ZJD/BxKFoJfDhV/YHo1EH6fXrWpdKiHI1MXRosHFb//DR70UnWVobhdgqLSV 6vDR0Un8y1aDLBMdQf3OEPuuG0gvMVblWftpJg7KUx4D8ZT45GVP1i6DSgE/GLrH+v3wKf HLFzuJ5k1rCH6nA7pzHh1EAzzwCeqFHgpBNYo0tcuPut7lkZEY34yZTVkFx18oCoDylcAZ YEWOwWQcYdzxxyR+33SmeNuQp/TFhPjM7pDNgP45MhhjUpdIDnuXjxj7AHvmC1E2rYOaLV eZ96bsr9tQPB6nhkKtOtZODaas0hA8qOMMB5KwS3bSOqEl6KLVqlmHORIdU6cA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4N0qwr1B5jz1CCK; Sun, 30 Oct 2022 22:01:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29UM10B9079012; Sun, 30 Oct 2022 22:01:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29UM10j5079011; Sun, 30 Oct 2022 22:01:00 GMT (envelope-from git) Date: Sun, 30 Oct 2022 22:01:00 GMT Message-Id: <202210302201.29UM10j5079011@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kirk McKusick Subject: git: 595746df6fe9 - main - Additional diagnostic output when running fsck_ffs with debugging flag (-d) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 595746df6fe946363233bd3eb73abe34e4457359 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667167260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mJ3AiKB5p8DwKfvRwFNywjy2N9Vg02iqJjEVasUDd6U=; b=mdLgF0xEEZzjXlao0VnO3SfBuexJQJA2Gwn3nxtB5oCsvYlszf5EvbLqDkrEPyZgmiT7fS 7DLG6JYuxYQHSyABnoJRPMXPzP3JEYYBky21t1gdAKqSAFJb53ceY+UEndutNYp+m3Ds7L hL5SplDTFloLPu1Fi7yDCybM2WulFsSRF6zHHLM5AponQm4xtzS5nMqkFS8umxvH/JbGbQ 5CODvPUmA42BhymYINOJFq9VC5cDwVQvlC8shO91bHxmIQ+fDB5BRPKzquZSvuzzn1aeRO Jyz8An/iTN97iYS61JXP6+x/0RZij3r1S4YBRiEkNtOrggAIx3WnUryVvSItdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667167260; a=rsa-sha256; cv=none; b=ZD9Ppx/cVz6as16qN8qN2Cxem6UXPry84oVqcPngFhxL566DKA2+VSGIMsdXnRY3Ghe1Gn kixjU+1RQjvQYVs8Kk/y4brrt4hHv5WXT4hFj+aLJ8nJMxet04j5Y6OdpBwLO3K8kO18hQ vVfYI48Qb1liPv4LRY6NMVDjyoYaLSAErRUXTP827Jd5oiZDkS7I7qw0AYgaSnKvssJOO/ Otcg+i9FQNq3of138d0+9V7qfq1s0dMgg+RZpxcmbZdcDhY362drDHP/YP4D0BBvxhdgFo O2GiKWYgIYNaO7sU1WGYMe1OL60wD9Z+feslwUl1f2iCgGRdcQ+RoQKiFZnKLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=595746df6fe946363233bd3eb73abe34e4457359 commit 595746df6fe946363233bd3eb73abe34e4457359 Author: Kirk McKusick AuthorDate: 2022-10-30 21:59:44 +0000 Commit: Kirk McKusick CommitDate: 2022-10-30 22:00:20 +0000 Additional diagnostic output when running fsck_ffs with debugging flag (-d) MFC after: 1 week 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;