All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: linux-xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH] xfs_repair: don't indicate dirtiness if FSGEOMETRY fails
Date: Fri, 16 Dec 2016 09:56:19 -0600	[thread overview]
Message-ID: <fceea296-989c-a71d-a6e7-23560fd6db8b@redhat.com> (raw)

Today, pointing repair at an image hosted on a non-xfs
filesystem will result in a XFS_IOC_FSGEOMETRY_V1 failure,
but repair generally proceeds without further problems.

However, calling do_warn() sets fs_is_dirty to 1, so
xfs_repair -n exits with non-zero status, indicating
corruption.  This is incorrect.

Change the message to use do_log so that it does not
incorrectly indicate corruption.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
--- 

diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
index d950a32..5c79fd9 100644
--- a/repair/xfs_repair.c
+++ b/repair/xfs_repair.c
@@ -696,7 +696,7 @@ main(int argc, char **argv)
 		struct xfs_fsop_geom_v1 geom = { 0 };
 
 		if (ioctl(fd, XFS_IOC_FSGEOMETRY_V1, &geom) < 0) {
-			do_warn(_("Cannot get host filesystem geometry.\n"
+			do_log(_("Cannot get host filesystem geometry.\n"
 		"Repair may fail if there is a sector size mismatch between\n"
 		"the image and the host filesystem.\n"));
 			geom.sectsize = BBSIZE;


             reply	other threads:[~2016-12-16 15:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-16 15:56 Eric Sandeen [this message]
2016-12-16 17:42 ` [PATCH] xfs_repair: don't indicate dirtiness if FSGEOMETRY fails Brian Foster
2016-12-19 10:24 ` Christoph Hellwig

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=fceea296-989c-a71d-a6e7-23560fd6db8b@redhat.com \
    --to=sandeen@redhat.com \
    --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.