Linux NFS development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chen Hanxiao <chenhx.fnst@fujitsu.com>, calum.mackay@oracle.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] pynfs: fix key error if FATTR4_OPEN_ARGUMENTS is not supported
Date: Thu, 20 Mar 2025 07:00:32 -0400	[thread overview]
Message-ID: <29ae7f23cafda80203209c3dc5bccced6951874c.camel@kernel.org> (raw)
In-Reply-To: <20250319032402.1789-1-chenhx.fnst@fujitsu.com>

On Wed, 2025-03-19 at 11:23 +0800, Chen Hanxiao wrote:
> If FATTR4_OPEN_ARGUMENTS is not supportd, DELEG24 and DELEG25
> will throw:
> 	KeyError: 86
> 
> Check FATTR4_OPEN_ARGUMENTS in caps from server
> 
> Signed-off-by: Chen Hanxiao <chenhx.fnst@fujitsu.com>
> ---
>  nfs4.1/server41tests/st_delegation.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/nfs4.1/server41tests/st_delegation.py b/nfs4.1/server41tests/st_delegation.py
> index fa9b451..f27e852 100644
> --- a/nfs4.1/server41tests/st_delegation.py
> +++ b/nfs4.1/server41tests/st_delegation.py
> @@ -311,6 +311,9 @@ def _testCbGetattr(t, env, change=0, size=0):
>                  OPEN4_SHARE_ACCESS_WRITE |
>                  OPEN4_SHARE_ACCESS_WANT_WRITE_DELEG)
>  
> +    if FATTR4_OPEN_ARGUMENTS not in caps:
> +        fail("FATTR4_OPEN_ARGUMENTS not supported")
> +
>      if caps[FATTR4_SUPPORTED_ATTRS] & FATTR4_OPEN_ARGUMENTS:
>          if caps[FATTR4_OPEN_ARGUMENTS].oa_share_access_want & OPEN_ARGS_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS:
>              openmask |= 1<<OPEN_ARGS_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS

Nice catch.

Reviewed-by: Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2025-03-20 11:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19  3:23 [PATCH] pynfs: fix key error if FATTR4_OPEN_ARGUMENTS is not supported Chen Hanxiao
2025-03-20 11:00 ` Jeff Layton [this message]
2025-03-25 20:21 ` Calum Mackay

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=29ae7f23cafda80203209c3dc5bccced6951874c.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=calum.mackay@oracle.com \
    --cc=chenhx.fnst@fujitsu.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