From: Dai Ngo <dai.ngo@oracle.com>
To: chuck.lever@oracle.com, jlayton@kernel.org, neilb@suse.de,
okorniev@redhat.com, tom@talpey.com
Cc: linux-nfs@vger.kernel.org, sagi@grimberg.me
Subject: [PATCH V2 0/2] NFSD: offer write delegation for OPEN with OPEN4_SHARE_ACCESS only
Date: Fri, 21 Feb 2025 15:42:18 -0800 [thread overview]
Message-ID: <1740181340-14562-1-git-send-email-dai.ngo@oracle.com> (raw)
From RFC8881 does not explicitly state that server must grant write
delegation to OPEN with OPEN4_SHARE_ACCESS_WRITE only. However there
are text in the RFC that implies it is up to the server implementation
to offer write delegation for OPEN with OPEN4_SHARE_ACCESS_WRITE only.
Section 9.1.2:
"In the case of READ, the server may perform the corresponding
check on the access mode, or it may choose to allow READ for
OPEN4_SHARE_ACCESS_WRITE, to accommodate clients whose WRITE
implementation may unavoidably do (e.g., due to buffer cache
constraints)."
Also in section 10.4.1
"Similarly, when closing a file opened for OPEN4_SHARE_ACCESS_WRITE/
OPEN4_SHARE_ACCESS_BOTH and if an OPEN_DELEGATE_WRITE delegation
is in effect"
This patch series offers write delegation for OPEN with OPEN4_SHARE_ACCESS_WRITE
only. The file struct, nfs4_file and nfs4_ol_stateid are upgraded
accordingly from write only access to read/write access. When the
delegation is returned, the file struct, nfs4_file and nfs4_ol_stateid
are downgraded according to remove the read access.
-- changes from v1:
0002: The file access mode is upgraded to include read access at the time
the delegation is granted and read access is removed when the delegation
is returned.
fs/nfsd/nfs4state.c | 96 +++++++++++++++++++++++++++++++++++++-----------
fs/nfsd/state.h | 2 +
2 files changed, 77 insertions(+), 21 deletions(-)
next reply other threads:[~2025-02-21 23:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 23:42 Dai Ngo [this message]
2025-02-21 23:42 ` [PATCH V2 1/2] NFSD: Offer write delegation for OPEN with OPEN4_SHARE_ACCESS_WRITE Dai Ngo
2025-02-21 23:42 ` [PATCH V2 2/2] NFSD: allow client to use write delegation stateid for READ Dai Ngo
2025-02-24 14:48 ` Chuck Lever
2025-02-24 21:11 ` Dai Ngo
2025-02-24 21:38 ` Chuck Lever
2025-02-24 15:48 ` Jeff Layton
2025-02-25 1:10 ` Dai Ngo
2025-02-25 12:31 ` Jeff Layton
2025-02-26 0:31 ` Dai Ngo
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=1740181340-14562-1-git-send-email-dai.ngo@oracle.com \
--to=dai.ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=okorniev@redhat.com \
--cc=sagi@grimberg.me \
--cc=tom@talpey.com \
/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