All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs_repair: don't indicate dirtiness if FSGEOMETRY fails
@ 2016-12-16 15:56 Eric Sandeen
  2016-12-16 17:42 ` Brian Foster
  2016-12-19 10:24 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Sandeen @ 2016-12-16 15:56 UTC (permalink / raw)
  To: linux-xfs

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;


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs_repair: don't indicate dirtiness if FSGEOMETRY fails
  2016-12-16 15:56 [PATCH] xfs_repair: don't indicate dirtiness if FSGEOMETRY fails Eric Sandeen
@ 2016-12-16 17:42 ` Brian Foster
  2016-12-19 10:24 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Foster @ 2016-12-16 17:42 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-xfs

On Fri, Dec 16, 2016 at 09:56:19AM -0600, Eric Sandeen wrote:
> 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>

> 
> 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;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs_repair: don't indicate dirtiness if FSGEOMETRY fails
  2016-12-16 15:56 [PATCH] xfs_repair: don't indicate dirtiness if FSGEOMETRY fails Eric Sandeen
  2016-12-16 17:42 ` Brian Foster
@ 2016-12-19 10:24 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2016-12-19 10:24 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: linux-xfs

On Fri, Dec 16, 2016 at 09:56:19AM -0600, Eric Sandeen wrote:
> 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.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-19 10:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-16 15:56 [PATCH] xfs_repair: don't indicate dirtiness if FSGEOMETRY fails Eric Sandeen
2016-12-16 17:42 ` Brian Foster
2016-12-19 10:24 ` Christoph Hellwig

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.