pnfs/blocklayout: report LAYOUTCOMMIT failures
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 3 repliesIn review
- v22 patches 5 repliesSuperseded
- v12 patches 3 repliesSuperseded
Changes in v3 from the cover letter
- Patch 1: add Reviewed-by tags.
- Patch 2: leave ->sync alone and check the file's writeback error in nfs_file_fsync() after pnfs_sync_inode(), so each fd reports the error once and stat() never returns it (Daejun). This drops the bl_sync() move and the raw wb_err read, and Christoph's v2 Reviewed-by.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | pnfs/blocklayout: don't mark extents committed after a failed LAYOUTCOMMITfs/ | +2 | 0 replies | |
| 2/2 | pnfs/blocklayout: report data lost to a failed LAYOUTCOMMITfs/ fs/ | +14 | 2 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Christoph Hellwig | Daejun Park |
|---|---|---|
| Series | T-b | |
| 1/2 | R-b | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/2] pnfs/blocklayout: report LAYOUTCOMMIT failures
From: Benjamin Coddington <[email protected]>
Data a block or SCSI layout client writes into unwritten extents becomes file data only when a LAYOUTCOMMIT succeeds. A server that has revoked the layout answers NFS4ERR_BADLAYOUT, nfs4_layoutcommit_done() ignores it, and fsync() and close() return 0 for data that reads back as zeroes. nfsd reaches this through its recall failure path today, and the layout recall series [1] makes it more likely.
Patch 1 keeps the extents uncommitted when the LAYOUTCOMMIT fails before its result is decoded. Patch 2 records a writeback error when extents go uncommitted, and has fsync() check for it after the LAYOUTCOMMIT.
Daejun tested the patch 2 approach on v2 in VMs, against an nfsd that answers a LAYOUTCOMMIT with NFS4ERR_BADLAYOUT; I've only compile-tested v3.
Changes since v2:
- Patch 1: add Reviewed-by tags.
- Patch 2: leave ->sync alone and check the file's writeback error in nfs_file_fsync() after pnfs_sync_inode(), so each fd reports the error once and stat() never returns it (Daejun). This drops the bl_sync() move and the raw wb_err read, and Christoph's v2 Reviewed-by.
v2: https://lore.kernel.org/linux-nfs/[email protected]/
v1: https://lore.kernel.org/linux-nfs/[email protected]/
[1] https://lore.kernel.org/linux-nfs/[email protected]/
Benjamin Coddington (2):
pnfs/blocklayout: don't mark extents committed after a failed
LAYOUTCOMMIT
pnfs/blocklayout: report data lost to a failed LAYOUTCOMMIT
fs/nfs/blocklayout/blocklayout.c | 3 ++- fs/nfs/blocklayout/extent_tree.c | 14 +++++++++++--- fs/nfs/file.c | 3 +++ 3 files changed, 16 insertions(+), 4 deletions(-)
base-commit: a90ee4305c4a5df72c11b31dacfdc76e00fcf78a
Signature · 1 line
2.53.0