public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Eryu Guan <guan@eryu.me>
To: Jeffle Xu <jefflexu@linux.alibaba.com>
Cc: fstests@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] common/rc: only force nfs4.2 non-default SEEK_HOLE behaviour
Date: Sun, 1 Aug 2021 18:42:11 +0800	[thread overview]
Message-ID: <YQZ6g6ZszcMzVlt4@desktop> (raw)
In-Reply-To: <20210729044758.63219-1-jefflexu@linux.alibaba.com>

[cc nfs list]

On Thu, Jul 29, 2021 at 12:47:58PM +0800, Jeffle Xu wrote:
> Only NFSv4.2 supports non-defautl SEEK_HOLE behaviour. Thus default
> SEEK_HOLE behaviour shall be allowed for NFSv4.0/4.1, or it will fail
> generic/285, generic/448, generic/490 on NFSv4.0/4.1, complaining they
> should support non-default SEEK_HOLE behaviour.
> 
> The *.full log is like:
> 	File system supports the default behavior.
> 	Default behavior is not allowed. Aborting.
> 
> Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>

Looks correct to me, but I'd like nfs folks to take a look as well, to
conform if only nfsv4.2 supports SEEK_DATA/SEEK_HOLE non-default
behavior.

Thanks,
Eryu

P.S.
Please cc the corresponding filesystem list next time if patch affects
the specific fs.

> ---
>  common/rc | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/common/rc b/common/rc
> index 25a838a3..9be6f89d 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -2495,10 +2495,10 @@ _fstyp_has_non_default_seek_data_hole()
>  		return 0
>  		;;
>  	nfs*)
> -		# NFSv2 and NFSv3 only support default behavior of SEEK_HOLE,
> -		# while NFSv4 supports non-default behavior
> -		local nfsvers=`_df_device $TEST_DEV | $AWK_PROG '{ print $2 }'`
> -		[ "$nfsvers" = "nfs4" ]
> +		# NFSv2, NFSv3, and NFSv4.0/4.1 only support default behavior of SEEK_HOLE,
> +		# while NFSv4.2 supports non-default behavior
> +		local nfsvers=`_mount() | grep $TEST_DEV | sed -n 's/^.*vers=\([0-9.]*\).*$/\1/p'`
> +		[ "$nfsvers" = "4.2" ]
>  		return $?
>  		;;
>  	overlay)
> -- 
> 2.27.0

  reply	other threads:[~2021-08-01 10:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29  4:47 [PATCH] common/rc: only force nfs4.2 non-default SEEK_HOLE behaviour Jeffle Xu
2021-08-01 10:42 ` Eryu Guan [this message]
2021-08-02 15:02   ` Anna Schumaker

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=YQZ6g6ZszcMzVlt4@desktop \
    --to=guan@eryu.me \
    --cc=fstests@vger.kernel.org \
    --cc=jefflexu@linux.alibaba.com \
    --cc=linux-nfs@vger.kernel.org \
    /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