diff mbox series

nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS

Message ID 20240815141841.29620-1-jlayton@kernel.org (mailing list archive)
State New
Headers show
Series nfs: fix the fetch of FATTR4_OPEN_ARGUMENTS | expand

Commit Message

Jeff Layton Aug. 15, 2024, 2:18 p.m. UTC
The client doesn't properly request FATTR4_OPEN_ARGUMENTS in the initial
SERVER_CAPS getattr. Add FATTR4_WORD2_OPEN_ARGUMENTS to the initial
request.

Fixes: 707f13b3d081 (NFSv4: Add support for the FATTR4_OPEN_ARGUMENTS attribute)
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/nfs/nfs4proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Layton Aug. 21, 2024, 12:20 p.m. UTC | #1
On Thu, 2024-08-15 at 10:18 -0400, Jeff Layton wrote:
> The client doesn't properly request FATTR4_OPEN_ARGUMENTS in the initial
> SERVER_CAPS getattr. Add FATTR4_WORD2_OPEN_ARGUMENTS to the initial
> request.
> 
> Fixes: 707f13b3d081 (NFSv4: Add support for the FATTR4_OPEN_ARGUMENTS attribute)
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
>  fs/nfs/nfs4proc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> index 8883016c551c..39ad7780986c 100644
> --- a/fs/nfs/nfs4proc.c
> +++ b/fs/nfs/nfs4proc.c
> @@ -3931,7 +3931,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;
> +		bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT | FATTR4_WORD2_OPEN_ARGUMENTS;
>  
>  	status = nfs4_call_sync(server->client, server, &msg, &args.seq_args, &res.seq_res, 0);
>  	if (status == 0) {

Ping? It would be nice to have this fixed before v6.11 ships.
Benjamin Coddington Aug. 21, 2024, 4:04 p.m. UTC | #2
On 15 Aug 2024, at 10:18, Jeff Layton wrote:

> The client doesn't properly request FATTR4_OPEN_ARGUMENTS in the initial
> SERVER_CAPS getattr. Add FATTR4_WORD2_OPEN_ARGUMENTS to the initial
> request.
>
> Fixes: 707f13b3d081 (NFSv4: Add support for the FATTR4_OPEN_ARGUMENTS attribute)
> Signed-off-by: Jeff Layton <jlayton@kernel.org>

Clearly correct, save for slight style mismatch.

Reviewed-by: Benjamin Coddington <bcodding@redhat.com>

Ben
Jeff Layton Aug. 21, 2024, 4:06 p.m. UTC | #3
On Wed, 2024-08-21 at 12:04 -0400, Benjamin Coddington wrote:
> On 15 Aug 2024, at 10:18, Jeff Layton wrote:
> 
> > The client doesn't properly request FATTR4_OPEN_ARGUMENTS in the
> > initial
> > SERVER_CAPS getattr. Add FATTR4_WORD2_OPEN_ARGUMENTS to the initial
> > request.
> > 
> > Fixes: 707f13b3d081 (NFSv4: Add support for the
> > FATTR4_OPEN_ARGUMENTS attribute)
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> 
> Clearly correct, save for slight style mismatch.
> 
> Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
> 
> Ben
> 

Thanks. I noticed that after sending it. No objection if you want to
fix that up before merging.
Trond Myklebust Aug. 21, 2024, 4:18 p.m. UTC | #4
On Wed, 2024-08-21 at 12:06 -0400, Jeff Layton wrote:
> On Wed, 2024-08-21 at 12:04 -0400, Benjamin Coddington wrote:
> > On 15 Aug 2024, at 10:18, Jeff Layton wrote:
> > 
> > > The client doesn't properly request FATTR4_OPEN_ARGUMENTS in the
> > > initial
> > > SERVER_CAPS getattr. Add FATTR4_WORD2_OPEN_ARGUMENTS to the
> > > initial
> > > request.
> > > 
> > > Fixes: 707f13b3d081 (NFSv4: Add support for the
> > > FATTR4_OPEN_ARGUMENTS attribute)
> > > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > 
> > Clearly correct, save for slight style mismatch.
> > 
> > Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
> > 
> > Ben
> > 
> 
> Thanks. I noticed that after sending it. No objection if you want to
> fix that up before merging.

Ack to this too.
Anna Schumaker Aug. 21, 2024, 7:30 p.m. UTC | #5
On Wed, Aug 21, 2024 at 8:20 AM Jeff Layton <jlayton@kernel.org> wrote:
>
> On Thu, 2024-08-15 at 10:18 -0400, Jeff Layton wrote:
> > The client doesn't properly request FATTR4_OPEN_ARGUMENTS in the initial
> > SERVER_CAPS getattr. Add FATTR4_WORD2_OPEN_ARGUMENTS to the initial
> > request.
> >
> > Fixes: 707f13b3d081 (NFSv4: Add support for the FATTR4_OPEN_ARGUMENTS attribute)
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> >  fs/nfs/nfs4proc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
> > index 8883016c551c..39ad7780986c 100644
> > --- a/fs/nfs/nfs4proc.c
> > +++ b/fs/nfs/nfs4proc.c
> > @@ -3931,7 +3931,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;
> > +             bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT | FATTR4_WORD2_OPEN_ARGUMENTS;
> >
> >       status = nfs4_call_sync(server->client, server, &msg, &args.seq_args, &res.seq_res, 0);
> >       if (status == 0) {
>
> Ping? It would be nice to have this fixed before v6.11 ships.

This and your other patch both look good to me. I'll try to get out a
bugfixes pull request by the end of the week!

Anna

> --
> Jeff Layton <jlayton@kernel.org>
diff mbox series

Patch

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 8883016c551c..39ad7780986c 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3931,7 +3931,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;
+		bitmask[2] = FATTR4_WORD2_SUPPATTR_EXCLCREAT | FATTR4_WORD2_OPEN_ARGUMENTS;
 
 	status = nfs4_call_sync(server->client, server, &msg, &args.seq_args, &res.seq_res, 0);
 	if (status == 0) {