linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] NFSD: add support for NFSv4 write delegation
@ 2023-05-15  0:20 Dai Ngo
  2023-05-15  0:20 ` [PATCH v2 1/4] locks: allow support for " Dai Ngo
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Dai Ngo @ 2023-05-15  0:20 UTC (permalink / raw)
  To: chuck.lever, jlayton; +Cc: linux-nfs, linux-fsdevel

NFSD: add support for NFSv4 write delegation

The NFSv4 server currently supports read delegation using VFS lease
which is implemented using file_lock. 

This patch series add write delegation support for NFSv4 server by:

    . remove the check for F_WRLCK in generic_add_lease to allow
      file_lock to be used for write delegation.  

    . grant write delegation for OPEN with NFS4_SHARE_ACCESS_WRITE
      if there is no conflict with other OPENs.

    . add XDR support for sending and receiving CB_GETATTR.

    . handle GETATTR from another client on a file that has outstanding
      write delegation by using CB_GETATTR to get the latest change_info
      and size for the GETATTR reply.

Write delegation conflict with another OPEN, REMOVE, RENAME and SETATTR
are handled the same as read delegation using notify_change, try_break_deleg.

Changes since v1:

[PATCH 3/4] NFSD: add supports for CB_GETATTR callback
- remove WARN_ON_ONCE from encode_bitmap4
- replace decode_bitmap4 with xdr_stream_decode_uint32_array
- replace xdr_inline_decode and xdr_decode_hyper in decode_cb_getattr
   with xdr_stream_decode_u64. Also remove the un-needed likely().
- modify signature of encode_cb_getattr4args to take pointer to
   nfs4_cb_fattr
- replace decode_attr_length with xdr_stream_decode_u32
- rename decode_cb_getattr to decode_cb_fattr4
- fold the initialization of cb_cinfo and cb_fsize into decode_cb_fattr4
- rename ncf_cb_cinfo to ncf_cb_change to avoid confusion of cindo usage
  in fs/nfsd/nfs4xdr.c
- correct NFS4_dec_cb_getattr_sz and update size description

[PATCH 4/4] NFSD: handle GETATTR conflict with write delegation
- change nfs4_handle_wrdeleg_conflict returns __be32 to fix test robot
- change ncf_cb_cinfo to ncf_cb_change to avoid confusion of cindo usage
  in fs/nfsd/nfs4xdr.c

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

end of thread, other threads:[~2023-05-16  1:43 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-15  0:20 [PATCH v2 0/4] NFSD: add support for NFSv4 write delegation Dai Ngo
2023-05-15  0:20 ` [PATCH v2 1/4] locks: allow support for " Dai Ngo
2023-05-15  0:20 ` [PATCH v2 2/4] NFSD: enable " Dai Ngo
2023-05-15 11:25   ` Jeff Layton
2023-05-15 17:57     ` dai.ngo
2023-05-15  0:20 ` [PATCH v2 3/4] NFSD: add supports for CB_GETATTR callback Dai Ngo
2023-05-15 17:44   ` kernel test robot
2023-05-15  0:20 ` [PATCH v2 4/4] NFSD: handle GETATTR conflict with write delegation Dai Ngo
2023-05-15 11:51   ` Jeff Layton
2023-05-15 17:59     ` dai.ngo
2023-05-15 18:14   ` Olga Kornievskaia
2023-05-15 18:26     ` dai.ngo
2023-05-15 18:58       ` Jeff Layton
2023-05-15 20:10         ` Olga Kornievskaia
2023-05-15 20:21           ` Jeff Layton
2023-05-15 21:37             ` Chuck Lever III
2023-05-15 22:53               ` Jeff Layton
2023-05-16  0:06                 ` Chuck Lever III
2023-05-16  0:35                   ` dai.ngo
2023-05-16  1:09                   ` Olga Kornievskaia
2023-05-16  1:43                 ` Trond Myklebust
2023-05-15 20:15         ` dai.ngo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).