]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: don't indicate dirtiness if FSGEOMETRY fails
authorEric Sandeen <sandeen@redhat.com>
Wed, 21 Dec 2016 04:38:06 +0000 (22:38 -0600)
committerEric Sandeen <sandeen@redhat.com>
Wed, 21 Dec 2016 04:38:06 +0000 (22:38 -0600)
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>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/xfs_repair.c

index d950a3206a620e53d18def4d0e5394e32a13709c..5c79fd95e6fda2ed4f08bc5ccb104d090da70249 100644 (file)
@@ -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;