mbox series

[0/4] NFSD: add support for NFSv4 write delegation

Message ID 1683841383-21372-1-git-send-email-dai.ngo@oracle.com (mailing list archive)
Headers show
Series NFSD: add support for NFSv4 write delegation | expand

Message

Dai Ngo May 11, 2023, 9:42 p.m. UTC
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.