From: Darrick J. Wong Date: Mon, 5 Jun 2023 15:38:01 +0000 (-0700) Subject: xfs_repair: fix messaging when fixing imap due to sparse cluster X-Git-Tag: v6.4.0~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1e12a0751b99efd48cda501258e16f00bef9d13d;p=thirdparty%2Fxfsprogs-dev.git xfs_repair: fix messaging when fixing imap due to sparse cluster 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 Reviewed-by: Carlos Maiolino Signed-off-by: Carlos Maiolino --- diff --git a/repair/dino_chunks.c b/repair/dino_chunks.c index 0841e65b1..64ce2a323 100644 --- a/repair/dino_chunks.c +++ b/repair/dino_chunks.c @@ -834,7 +834,7 @@ next_readbuf: 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"));