mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC][PATCH] nfs: Revert "nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS"
@ 2025-04-18  1:10 Andrew Zaborowski
  2025-04-18  2:02 ` Andrew Zaborowski
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Zaborowski @ 2025-04-18  1:10 UTC (permalink / raw)
  To: linux-nfs
  Cc: linux-kernel, Trond Myklebust, Anna Schumaker, Jeff Layton, balrogg

This mainly reverts commit cb78f9b7d0c0c9f86d8c0ac9c46b8b684d8785a9
which added the requesting of FATTR4_OPEN_ARGUMENTS through
GETATTR_BITMAP to the get server capabilities sequence whenever protocol
version is 4.1 or higher.  This attribute was apparently defined in
RFC9754 as an extension to v4.2, never valid in v4.1, but it is neither
valid for use in OP_GETATTR.  As far as I understand, the client is
supposed to detect support for FATTR4_OPEN_ARGUMENTS using
FATTR4_SUPPORTED_ATTRS only.

In effect this seemed to break v4.1 client, server would return error to
this request.

While there, remove the unneeded initialization of bitmask[0] which is
soon overwritten.  The initialization was added in commit 707f13b3d081
which cb78f9b7d0c0 purported to fix.

Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com>
---
 fs/nfs/nfs4proc.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 970f28dbf253..3003f78e8764 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3943,9 +3943,7 @@ static bool nfs4_server_delegtime_capable(struct nfs4_server_caps_res *res)
 static int _nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle)
 {
 	u32 minorversion = server->nfs_client->cl_minorversion;
-	u32 bitmask[3] = {
-		[0] = FATTR4_WORD0_SUPPORTED_ATTRS,
-	};
+	u32 bitmask[3] = {};
 	struct nfs4_server_caps_arg args = {
 		.fhandle = fhandle,
 		.bitmask = bitmask,
@@ -3967,8 +3965,7 @@ 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;
 
 	status = nfs4_call_sync(server->client, server, &msg, &args.seq_args, &res.seq_res, 0);
 	if (status == 0) {
-- 
2.47.1


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

* Re: [RFC][PATCH] nfs: Revert "nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS"
  2025-04-18  1:10 [RFC][PATCH] nfs: Revert "nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS" Andrew Zaborowski
@ 2025-04-18  2:02 ` Andrew Zaborowski
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Zaborowski @ 2025-04-18  2:02 UTC (permalink / raw)
  To: linux-nfs; +Cc: linux-kernel, Trond Myklebust, Anna Schumaker, Jeff Layton

On Fri, 18 Apr 2025 at 03:10, Andrew Zaborowski
<andrew.zaborowski@intel.com> wrote:
> version is 4.1 or higher.  This attribute was apparently defined in
> RFC9754 as an extension to v4.2, never valid in v4.1, but it is neither
> valid for use in OP_GETATTR.

My bad, re-reading the specs this is wrong.  As long as an attribute
is not Required in v4.1 the v4.1 server shouldn't have returned an
error.  I need to look at the specific server.  Please ignore this
message and sorry for the noise.

Best regards

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

end of thread, other threads:[~2025-04-18  2:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-18  1:10 [RFC][PATCH] nfs: Revert "nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS" Andrew Zaborowski
2025-04-18  2:02 ` Andrew Zaborowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®