[PATCH v2 0/3] pNFS/flexfiles: honor clora_changed and report cancelled I/O
Benjamin Coddington <ben.coddington-F/[email protected]>
| Newsgroups | gmane.linux.nfs |
|---|---|
| Message-ID | <[email protected]> |
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(-)
--
2.53.0