From: Benjamin Coddington <ben.coddington@hammerspace.com>
To: Trond Myklebust <trondmy@kernel.org>, Anna Schumaker <anna@kernel.org>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 0/2] NFS: layout changes while building mirrored writes
Date: Thu, 15 Oct 2026 16:58:07 -0400 [thread overview]
Message-ID: <cover.1792097624.git.bcodding@hammerspace.com> (raw)
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
next reply other threads:[~2026-10-15 20:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-15 20:58 Benjamin Coddington [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1792097624.git.bcodding@hammerspace.com \
--to=ben.coddington@hammerspace.com \
--cc=anna@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox