All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] nfs: NFSv4.2 client support for UNCACHEABLE_FILE_DATA
@ 2026-06-24 19:17 Mike Snitzer
  2026-06-24 19:17 ` [PATCH 1/4] nfs4.2: add nfs4_2.x to generate the UNCACHEABLE_FILE_DATA attribute Mike Snitzer
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Mike Snitzer @ 2026-06-24 19:17 UTC (permalink / raw)
  To: Trond Myklebust, Anna Schumaker; +Cc: Tom Haynes, Chuck Lever, linux-nfs

Hi,

This series adds Linux NFSv4.2 client support for the uncacheable file
data attribute defined by draft-ietf-nfsv4-uncacheable-files [1].

The attribute is an OPTIONAL, per-file, read-write boolean (FATTR4
number 87) that a server may set on a regular file to advise the client
to suppress client-side caching of that file's data -- both write-behind
and read caching.  It is conceptually similar to O_DIRECT but operates at
the protocol level and requires no application changes.  The motivating
use case is HPC-style concurrent writers modifying disjoint byte ranges
of a shared file, where cached/delayed writes cause read-modify-write
hazards ("write holes").

This client honors a server-set attribute; it does not set it (that is
left to server/administrator policy).  When a regular file is marked
uncacheable, the client opens it O_DIRECT, which suppresses read and
write-behind caching and satisfies the spec's durability invariant via
the existing direct-I/O path.  The attribute applies only to regular
files (NF4REG), so the client requests it only for regular files.

The series is organized as:

  1/4  add Documentation/sunrpc/xdr/nfs4_2.x and generate the
       FATTR4_UNCACHEABLE_FILE_DATA definition via xdrgen, mirroring how
       the sibling NFSv4.2 attributes are defined and consumed.
  2/4  decode the attribute via GETATTR, track per-exported-filesystem
       support, and record it on the inode.
  3/4  request the attribute only for regular files, since a server must
       reject a query of it on any other object type with NFS4ERR_INVAL.
  4/4  open uncacheable regular files O_DIRECT.

[1] https://datatracker.ietf.org/doc/draft-ietf-nfsv4-uncacheable-files/

All review appreciated, thanks.
Mike

Mike Snitzer (3):
  nfs4.2: add nfs4_2.x to generate the UNCACHEABLE_FILE_DATA attribute
  nfs4.2: request UNCACHEABLE_FILE_DATA only for regular files
  nfs4.2: open UNCACHEABLE_FILE_DATA files with O_DIRECT

Tom Haynes (1):
  nfs4.2: add UNCACHEABLE_FILE_DATA attribute support

 Documentation/sunrpc/xdr/nfs4_2.x    | 52 ++++++++++++++++++++++++
 fs/nfs/dir.c                         |  4 ++
 fs/nfs/inode.c                       | 24 +++++++++--
 fs/nfs/nfs4file.c                    |  2 +
 fs/nfs/nfs4proc.c                    | 60 +++++++++++++++++++++++++---
 fs/nfs/nfs4trace.h                   |  4 +-
 fs/nfs/nfs4xdr.c                     | 35 +++++++++++++++-
 fs/nfs/nfstrace.h                    |  3 +-
 fs/nfsd/Makefile                     |  5 ++-
 include/linux/nfs4.h                 |  2 +
 include/linux/nfs_fs.h               |  4 ++
 include/linux/nfs_xdr.h              |  8 +++-
 include/linux/sunrpc/xdrgen/nfs4_2.h | 19 +++++++++
 13 files changed, 209 insertions(+), 13 deletions(-)
 create mode 100644 Documentation/sunrpc/xdr/nfs4_2.x
 create mode 100644 include/linux/sunrpc/xdrgen/nfs4_2.h

-- 
2.47.3


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

end of thread, other threads:[~2026-06-24 19:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-24 19:17 [PATCH 0/4] nfs: NFSv4.2 client support for UNCACHEABLE_FILE_DATA Mike Snitzer
2026-06-24 19:17 ` [PATCH 1/4] nfs4.2: add nfs4_2.x to generate the UNCACHEABLE_FILE_DATA attribute Mike Snitzer
2026-06-24 19:17 ` [PATCH 2/4] nfs4.2: add UNCACHEABLE_FILE_DATA attribute support Mike Snitzer
2026-06-24 19:17 ` [PATCH 3/4] nfs4.2: request UNCACHEABLE_FILE_DATA only for regular files Mike Snitzer
2026-06-24 19:17 ` [PATCH 4/4] nfs4.2: open UNCACHEABLE_FILE_DATA files with O_DIRECT Mike Snitzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.