* [PATCH] NFSv4: Don't check for OPEN feature support in v4.1
@ 2025-04-30 11:12 Scott Mayhew
2025-04-30 12:51 ` Jeff Layton
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Scott Mayhew @ 2025-04-30 11:12 UTC (permalink / raw)
To: trondmy, anna; +Cc: linux-nfs
fattr4_open_arguments is a v4.2 recommended attribute, so we shouldn't
be sending it to v4.1 servers.
Fixes: cb78f9b7d0c0 ("nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS")
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
---
fs/nfs/nfs4proc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 970f28dbf253..2eb2d750a5f1 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3967,8 +3967,9 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
FATTR4_WORD0_CASE_INSENSITIVE |
FATTR4_WORD0_CASE_PRESERVING;
if (minorversion)
- bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT |
- FATTR4_WORD2_OPEN_ARGUMENTS;
+ bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT;
+ if (minorversion > 1)
+ bitmask[2] |= FATTR4_WORD2_OPEN_ARGUMENTS;
status = nfs4_call_sync(server->client, server, &msg, &args.seq_args, &res.seq_res, 0);
if (status == 0) {
--
2.48.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] NFSv4: Don't check for OPEN feature support in v4.1
2025-04-30 11:12 [PATCH] NFSv4: Don't check for OPEN feature support in v4.1 Scott Mayhew
@ 2025-04-30 12:51 ` Jeff Layton
2025-05-07 14:53 ` Benjamin Coddington
2025-05-13 19:26 ` Jeff Layton
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Layton @ 2025-04-30 12:51 UTC (permalink / raw)
To: Scott Mayhew, trondmy, anna; +Cc: linux-nfs
On Wed, 2025-04-30 at 07:12 -0400, Scott Mayhew wrote:
> fattr4_open_arguments is a v4.2 recommended attribute, so we shouldn't
> be sending it to v4.1 servers.
>
> Fixes: cb78f9b7d0c0 ("nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS")
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
> ---
> fs/nfs/nfs4proc.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 970f28dbf253..2eb2d750a5f1 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -3967,8 +3967,9 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
> FATTR4_WORD0_CASE_INSENSITIVE |
> FATTR4_WORD0_CASE_PRESERVING;
> if (minorversion)
> - bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT |
> - FATTR4_WORD2_OPEN_ARGUMENTS;
> + bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT;
> + if (minorversion > 1)
> + bitmask[2] |= FATTR4_WORD2_OPEN_ARGUMENTS;
>
> status = nfs4_call_sync(server->client, server, &msg, &args.seq_args, &res.seq_res, 0);
> if (status == 0) {
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] NFSv4: Don't check for OPEN feature support in v4.1
2025-04-30 11:12 [PATCH] NFSv4: Don't check for OPEN feature support in v4.1 Scott Mayhew
2025-04-30 12:51 ` Jeff Layton
@ 2025-05-07 14:53 ` Benjamin Coddington
2025-05-13 19:26 ` Jeff Layton
2 siblings, 0 replies; 4+ messages in thread
From: Benjamin Coddington @ 2025-05-07 14:53 UTC (permalink / raw)
To: Scott Mayhew, anna, trondmy; +Cc: linux-nfs
On 30 Apr 2025, at 7:12, Scott Mayhew wrote:
> fattr4_open_arguments is a v4.2 recommended attribute, so we shouldn't
> be sending it to v4.1 servers.
>
> Fixes: cb78f9b7d0c0 ("nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS")
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Cc: stable@vger.kernel.org # 6.11+
It would be lovely to have this fixed in v6.15.
Ben
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] NFSv4: Don't check for OPEN feature support in v4.1
2025-04-30 11:12 [PATCH] NFSv4: Don't check for OPEN feature support in v4.1 Scott Mayhew
2025-04-30 12:51 ` Jeff Layton
2025-05-07 14:53 ` Benjamin Coddington
@ 2025-05-13 19:26 ` Jeff Layton
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Layton @ 2025-05-13 19:26 UTC (permalink / raw)
To: Scott Mayhew, trondmy, anna; +Cc: linux-nfs
On Wed, 2025-04-30 at 07:12 -0400, Scott Mayhew wrote:
> fattr4_open_arguments is a v4.2 recommended attribute, so we shouldn't
> be sending it to v4.1 servers.
>
> Fixes: cb78f9b7d0c0 ("nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS")
> Signed-off-by: Scott Mayhew <smayhew@redhat.com>
> ---
> fs/nfs/nfs4proc.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 970f28dbf253..2eb2d750a5f1 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -3967,8 +3967,9 @@ static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *f
> FATTR4_WORD0_CASE_INSENSITIVE |
> FATTR4_WORD0_CASE_PRESERVING;
> if (minorversion)
> - bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT |
> - FATTR4_WORD2_OPEN_ARGUMENTS;
> + bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT;
> + if (minorversion > 1)
> + bitmask[2] |= FATTR4_WORD2_OPEN_ARGUMENTS;
>
> status = nfs4_call_sync(server->client, server, &msg, &args.seq_args, &res.seq_res, 0);
> if (status == 0) {
I just want to point out that this _shouldn't_ be a problem with a
properly functioning server. The server should just not return the
attribute in the reply rather than returning a hard error or failing
when it doesn't recognize the attribute.
If requesting this was causing a problem, then it's probably indicative
of a server bug.
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-13 19:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30 11:12 [PATCH] NFSv4: Don't check for OPEN feature support in v4.1 Scott Mayhew
2025-04-30 12:51 ` Jeff Layton
2025-05-07 14:53 ` Benjamin Coddington
2025-05-13 19:26 ` Jeff Layton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox