From 8ebad4d47249d8540e3e46cbafde7eb70a06673b Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Tue, 20 Dec 2016 22:38:06 -0600 Subject: [PATCH] xfs_repair: don't indicate dirtiness if FSGEOMETRY fails 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 Reviewed-by: Brian Foster Signed-off-by: Eric Sandeen --- repair/xfs_repair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c index d950a3206..5c79fd95e 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; -- 2.47.2