Skip to content

pNFS/flexfiles: honor clora_changed and report cancelled I/O

Benjamin Coddington linux-nfs 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 0 repliesNew
  2. v13 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3pNFS: report clora_changed in the cb_layoutrecall_file tracepointfs/nfs/callback_proc.c fs/nfs/nfs4trace.h+55 -20 replies
2/3pNFS: honor clora_changed when recalling a layoutfs/nfs/callback_proc.c fs/nfs/pnfs.c fs/nfs/pnfs.h+16 -110 replies
3/3NFSv4/flexfiles: report cancelled I/O as a layout errorfs/nfs/flexfilelayout/flexfilelayout.c+22 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] pNFS/flexfiles: honor clora_changed and report cancelled I/O

RFC 8881 section 20.3.3 lets CB_LAYOUTRECALL carry clora_changed: when it is FALSE the client may flush modified data to the data servers before returning the layout; only when it is TRUE should it stop writing to the DS and redirect through the MDS. The client decodes cbl_layoutchanged but has ignored it since commit b739a5bd9d9f ("NFSv4/flexfiles: Cancel I/O if the layout is recalled or revoked"), cancelling in-flight DS I/O unconditionally -- which can leave a write incomplete at the DS with no write layout held.

This series teaches the client to honor clora_changed: on an unchanged recall it drains its in-flight DS writes before LAYOUTRETURN instead of cancelling them; when it does cancel (changed recall, or revoke) the cancelled I/O is reported to the server as NFS4ERR_NXIO so it can reconcile the affected mirror instance. Patch 1 adds clora_changed to the recall tracepoint.

Changes on v2:
Anna: fix missing kerneldoc comment, remove FILE_INODE

Based on Anna's nfs-for-7.2-1.

Benjamin Coddington (3):
pNFS: report clora_changed in the cb_layoutrecall_file tracepoint
pNFS: honor clora_changed when recalling a layout NFSv4/flexfiles: report cancelled I/O as a layout error

 fs/nfs/callback_proc.c                 |  5 ++-
 fs/nfs/flexfilelayout/flexfilelayout.c | 23 ++++++++++-
 fs/nfs/nfs4trace.h                     | 55 +++++++++++++++++++++++++-
 fs/nfs/pnfs.c                          | 22 ++++++-----
 fs/nfs/pnfs.h                          |  2 +-
 5 files changed, 93 insertions(+), 14 deletions(-)
Signature · 1 line
2.53.0