NFS: layout changes while building mirrored writes
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | NFS: Resend unsent mirror requests when an O_DIRECT write hits -EAGAINfs/ fs/ fs/ +2 more | +38 | 0 replies | |
| 2/2 | NFS: Don't warn when a changed layout refuses a split subrequestfs/ | +13 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] NFS: layout changes while building mirrored writes
From: Benjamin Coddington <[email protected]>
These two fix trouble the pageio code has when a flexfiles layout is recalled and comes back with a different mirror count while a write is being built. The first is data loss: an O_DIRECT write drops one mirror's share of the bytes and still returns success. The second is a WARN_ON_ONCE in __nfs_pageio_add_request() that the same race trips when a request has to be split, which looks like a pg_test bug but isn't.
I reproduced this against a server that alternates each RW layout between three mirrors and two and recalls it about a millisecond after granting it, with mirrors at different wsizes (1M and 64K). Without these, 5 of 10 64MiB O_DIRECT rewrites left the 1M mirror holding the previous data in 64K multiples. With them I haven't seen a loss the client was responsible for in a few hundred iterations, buffered or O_DIRECT. Buffered writes weren't affected by the first problem since nfs_async_write_error() redirties on -EAGAIN.
Benjamin Coddington (2):
NFS: Resend unsent mirror requests when an O_DIRECT write hits -EAGAIN
NFS: Don't warn when a changed layout refuses a split subrequest
fs/nfs/direct.c | 28 ++++++++++++++++++++++++++-- fs/nfs/pagelist.c | 20 ++++++++++++++++---- fs/nfs/read.c | 3 ++- fs/nfs/write.c | 5 +++-- include/linux/nfs_xdr.h | 5 ++++- 5 files changed, 51 insertions(+), 10 deletions(-)
Signature · 1 line
2.53.0