All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, cem@kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 5/5] xfs_repair: fix messaging when fixing imap due to sparse cluster
Date: Mon, 05 Jun 2023 08:38:01 -0700	[thread overview]
Message-ID: <168597948159.1226461.18433540672354330389.stgit@frogsfrogsfrogs> (raw)
In-Reply-To: <168597945354.1226461.5438962607608083851.stgit@frogsfrogsfrogs>

From: Darrick J. Wong <djwong@kernel.org>

This logic is wrong -- if we're in verbose dry-run mode, we do NOT want
to say that we're correcting the imap.  Otherwise, we print things like:

imap claims inode XXX is present, but inode cluster is sparse,

But then we can erroneously tell the user that we would correct the
imap when in fact we /are/ correcting it.

Fixes: f4ff8086586 ("xfs_repair: don't crash on partially sparse inode clusters")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 repair/dino_chunks.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/repair/dino_chunks.c b/repair/dino_chunks.c
index 33008853789..171756818a6 100644
--- a/repair/dino_chunks.c
+++ b/repair/dino_chunks.c
@@ -834,7 +834,7 @@ process_inode_chunk(
 			do_warn(
 	_("imap claims inode %" PRIu64 " is present, but inode cluster is sparse, "),
 						ino);
-			if (verbose || !no_modify)
+			if (!no_modify)
 				do_warn(_("correcting imap\n"));
 			else
 				do_warn(_("would correct imap\n"));


  parent reply	other threads:[~2023-06-05 15:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05 15:37 [PATCHSET 0/5] xfs_repair: fix corruption messaging with verbose mode Darrick J. Wong
2023-06-05 15:37 ` [PATCH 1/5] xfs_repair: don't spray correcting imap all by itself Darrick J. Wong
2023-06-06 10:50   ` Carlos Maiolino
2023-06-05 15:37 ` [PATCH 2/5] xfs_repair: don't log inode problems without printing resolution Darrick J. Wong
2023-06-06 10:56   ` Carlos Maiolino
2023-06-05 15:37 ` [PATCH 3/5] xfs_repair: fix messaging when shortform_dir2_junk is called Darrick J. Wong
2023-06-06 10:57   ` Carlos Maiolino
2023-06-05 15:37 ` [PATCH 4/5] xfs_repair: fix messaging in longform_dir2_entry_check_data Darrick J. Wong
2023-06-06 10:59   ` Carlos Maiolino
2023-06-05 15:38 ` Darrick J. Wong [this message]
2023-06-06 11:00   ` [PATCH 5/5] xfs_repair: fix messaging when fixing imap due to sparse cluster Carlos Maiolino
2023-06-05 18:59 ` [PATCHSET 0/5] xfs_repair: fix corruption messaging with verbose mode Pavel Reichl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=168597948159.1226461.18433540672354330389.stgit@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=cem@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.