mbox series

[v2,0/3] Offer write delegations for O_WRONLY opens

Message ID 20240728204104.519041-1-sagi@grimberg.me (mailing list archive)
Headers show
Series Offer write delegations for O_WRONLY opens | expand

Message

Sagi Grimberg July 28, 2024, 8:41 p.m. UTC
Since some known workloads do open files with O_WRONLY can benefit
from write delegations, we want to allow them.

The patch set is based on the initial attempt by Dai Ngo in:
https://lore.kernel.org/linux-nfs/1688089960-24568-3-git-send-email-dai.ngo@oracle.com/

THe problem back then was a reported breakage in pynfs test that exercises
reads using anonymous stateids.

Changes from v1:
- collected review tags
- remove f_mode tinkering and instead open locally a file as rw in case
  the client opened the file as wronly and got a write delegation
- splitted the anonymous stateid read conflict handling to a separate patch

Sagi Grimberg (3):
  nfsd: don't assume copy notify when preprocessing the stateid
  nfsd: Offer write delegations for o_wronly opens
  nfsd: resolve possible conflicts of reads using special stateids and
    write delegations

 fs/nfsd/nfs4proc.c  | 25 +++++++++++-
 fs/nfsd/nfs4state.c | 95 ++++++++++++++++++++++++++++++++-------------
 fs/nfsd/state.h     |  2 +
 fs/nfsd/xdr4.h      |  2 +
 4 files changed, 95 insertions(+), 29 deletions(-)