public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Jan Kara <jack@suse.cz>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH] Fix fsx errors due to unsupported FIDEDUPERANGE
Date: Thu, 28 Mar 2019 08:31:46 -0700	[thread overview]
Message-ID: <20190328153146.GE6537@magnolia> (raw)
In-Reply-To: <20190328105119.31257-1-jack@suse.cz>

On Thu, Mar 28, 2019 at 11:51:19AM +0100, Jan Kara wrote:
> Older kernels (prior commit 494633fac7896 "vfs: vfs_dedupe_file_range()
> doesn't return EOPNOTSUPP") will return EINVAL when operation is not
> supported. Make fsx treat this error as a sign of unsupported
> deduplication as well to make it usable with these older kernels.

Bleh, I forgot about that age-old quirk...

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D


> Signed-off-by: Jan Kara <jack@suse.cz>
> ---
>  ltp/fsx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/ltp/fsx.c b/ltp/fsx.c
> index f4a1c7cf820b..391824bfbc68 100644
> --- a/ltp/fsx.c
> +++ b/ltp/fsx.c
> @@ -1482,7 +1482,8 @@ test_dedupe_range(void)
>  	else
>  		error = 0;
>  
> -	if (error == EOPNOTSUPP || error == ENOTTY) {
> +	/* Older kernels may return EINVAL... */
> +	if (error == EOPNOTSUPP || error == ENOTTY || error == EINVAL) {
>  		if (!quiet)
>  			fprintf(stderr,
>  				"main: filesystem does not support "
> -- 
> 2.16.4
> 

      reply	other threads:[~2019-03-28 15:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 10:51 [PATCH] Fix fsx errors due to unsupported FIDEDUPERANGE Jan Kara
2019-03-28 15:31 ` Darrick J. Wong [this message]

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=20190328153146.GE6537@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=jack@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox