All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfs_io: prefix dedupe command error messages consistently
@ 2016-12-19 19:50 Darrick J. Wong
  2016-12-20  0:06 ` Eric Sandeen
  2016-12-20 20:24 ` Eric Sandeen
  0 siblings, 2 replies; 3+ messages in thread
From: Darrick J. Wong @ 2016-12-19 19:50 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs

Prefix the perror output of the dedupe command consistently.  All the
other perror calls reference the ioctl name directly, so we might as
well do that for all the dedupe cases.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 io/reflink.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/io/reflink.c b/io/reflink.c
index d4c745c..dde26b8 100644
--- a/io/reflink.c
+++ b/io/reflink.c
@@ -79,12 +79,12 @@ dedupe_ioctl(
 			goto done;
 		}
 		if (info->status < 0) {
-			fprintf(stderr, "dedupe: %s\n",
+			fprintf(stderr, "XFS_IOC_FILE_EXTENT_SAME: %s\n",
 					_(strerror(-info->status)));
 			goto done;
 		}
 		if (info->status == XFS_EXTENT_DATA_DIFFERS) {
-			fprintf(stderr, "dedupe: %s\n",
+			fprintf(stderr, "XFS_IOC_FILE_EXTENT_SAME: %s\n",
 					_("Extents did not match."));
 			goto done;
 		}

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

* Re: [PATCH] xfs_io: prefix dedupe command error messages consistently
  2016-12-19 19:50 [PATCH] xfs_io: prefix dedupe command error messages consistently Darrick J. Wong
@ 2016-12-20  0:06 ` Eric Sandeen
  2016-12-20 20:24 ` Eric Sandeen
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2016-12-20  0:06 UTC (permalink / raw)
  To: Darrick J. Wong, Eric Sandeen; +Cc: xfs

On 12/19/16 1:50 PM, Darrick J. Wong wrote:
> Prefix the perror output of the dedupe command consistently.  All the
> other perror calls reference the ioctl name directly, so we might as
> well do that for all the dedupe cases.

I guess it's fine - technically, these aren't perrors.  :)

and there are plenty of places like this too, though:

       } else if (xfsctl(name, file->fd, FS_IOC_FSGETXATTR, &attr) < 0) {
                fprintf(stderr, _("%s: cannot get flags on %s: %s\n"),
                        progname, name, strerror(errno));

as well.  I'd probably argue for an actual ioctl error to include
the ioctl name, but the "eh, can't dedupe" message to be a bit more
friendly (i.e. "dedupe: ...") - but I may be bikeshedding too much?

-Eric


> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  io/reflink.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/io/reflink.c b/io/reflink.c
> index d4c745c..dde26b8 100644
> --- a/io/reflink.c
> +++ b/io/reflink.c
> @@ -79,12 +79,12 @@ dedupe_ioctl(
>  			goto done;
>  		}
>  		if (info->status < 0) {
> -			fprintf(stderr, "dedupe: %s\n",
> +			fprintf(stderr, "XFS_IOC_FILE_EXTENT_SAME: %s\n",
>  					_(strerror(-info->status)));
>  			goto done;
>  		}
>  		if (info->status == XFS_EXTENT_DATA_DIFFERS) {
> -			fprintf(stderr, "dedupe: %s\n",
> +			fprintf(stderr, "XFS_IOC_FILE_EXTENT_SAME: %s\n",
>  					_("Extents did not match."));
>  			goto done;
>  		}
> --
> 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_io: prefix dedupe command error messages consistently
  2016-12-19 19:50 [PATCH] xfs_io: prefix dedupe command error messages consistently Darrick J. Wong
  2016-12-20  0:06 ` Eric Sandeen
@ 2016-12-20 20:24 ` Eric Sandeen
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Sandeen @ 2016-12-20 20:24 UTC (permalink / raw)
  To: Darrick J. Wong, Eric Sandeen; +Cc: xfs

On 12/19/16 1:50 PM, Darrick J. Wong wrote:
> Prefix the perror output of the dedupe command consistently.  All the
> other perror calls reference the ioctl name directly, so we might as
> well do that for all the dedupe cases.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

ok, after some offline discussion, *shrug* this is fine.

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

> ---
>  io/reflink.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/io/reflink.c b/io/reflink.c
> index d4c745c..dde26b8 100644
> --- a/io/reflink.c
> +++ b/io/reflink.c
> @@ -79,12 +79,12 @@ dedupe_ioctl(
>  			goto done;
>  		}
>  		if (info->status < 0) {
> -			fprintf(stderr, "dedupe: %s\n",
> +			fprintf(stderr, "XFS_IOC_FILE_EXTENT_SAME: %s\n",
>  					_(strerror(-info->status)));
>  			goto done;
>  		}
>  		if (info->status == XFS_EXTENT_DATA_DIFFERS) {
> -			fprintf(stderr, "dedupe: %s\n",
> +			fprintf(stderr, "XFS_IOC_FILE_EXTENT_SAME: %s\n",
>  					_("Extents did not match."));
>  			goto done;
>  		}
> --
> 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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19 19:50 [PATCH] xfs_io: prefix dedupe command error messages consistently Darrick J. Wong
2016-12-20  0:06 ` Eric Sandeen
2016-12-20 20:24 ` Eric Sandeen

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.