Linux NFS development
 help / color / mirror / Atom feed
* [PATCH 0/2] NFS: layout changes while building mirrored writes
@ 2026-10-15 20:58 Benjamin Coddington
  2026-10-15 20:58 ` [PATCH 1/2] NFS: Resend unsent mirror requests when an O_DIRECT write hits -EAGAIN Benjamin Coddington
  2026-10-15 20:58 ` [PATCH 2/2] NFS: Don't warn when a changed layout refuses a split subrequest Benjamin Coddington
  0 siblings, 2 replies; 3+ messages in thread
From: Benjamin Coddington @ 2026-10-15 20:58 UTC (permalink / raw)
  To: Trond Myklebust, Anna Schumaker; +Cc: linux-nfs

From: Benjamin Coddington <bcodding@hammerspace.com>

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(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-10-15 20:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15 20:58 [PATCH 0/2] NFS: layout changes while building mirrored writes Benjamin Coddington
2026-10-15 20:58 ` [PATCH 1/2] NFS: Resend unsent mirror requests when an O_DIRECT write hits -EAGAIN Benjamin Coddington
2026-10-15 20:58 ` [PATCH 2/2] NFS: Don't warn when a changed layout refuses a split subrequest Benjamin Coddington

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox