From: Lucheng Bao <lubao@everpuredata.com>
To: linux-nfs@vger.kernel.org, Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>
Cc: linux-kernel@vger.kernel.org, tmenninger@everpuredata.com,
jcurley@everpuredata.com, Lucheng Bao <lubao@everpuredata.com>
Subject: [PATCH 0/2] NFSv4/pNFS: don't trust inode size from MDS while LAYOUTCOMMIT is outstanding
Date: Thu, 8 Oct 2026 22:28:41 +0000 [thread overview]
Message-ID: <20261008222843.63319-1-lubao@everpuredata.com> (raw)
When a layout requires LAYOUTCOMMIT, the size reported by the MDS may stay
stale until the commit is processed. The client already keeps i_size
from shrinking while writes are outstanding. This series extends that
protection to an outstanding LAYOUTCOMMIT.
Patch 1 rejects smaller sizes while a LAYOUTCOMMIT is pending or in
flight.
Patch 2 defers a LAYOUTRETURN whose OLD_STATEID refresh fails because a
newer segment is busy. Today that return is treated as complete and the
pending LAYOUTCOMMIT is discarded.
Without this series, a stale OPEN or CLOSE reply can lower i_size, and
the next O_APPEND write then lands at the old offset.
Lucheng Bao (2):
NFSv4/pNFS: prevent i_size regression while layoutcommit is outstanding
NFSv4/pNFS: defer LAYOUTRETURN after an unsuccessful OLD_STATEID refresh
fs/nfs/inode.c | 8 ++++++--
fs/nfs/nfs4proc.c | 3 ++-
2 files changed, 8 insertions(+), 3 deletions(-)
--
2.34.1
next reply other threads:[~2026-10-08 22:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 22:28 Lucheng Bao [this message]
2026-10-08 22:28 ` [PATCH 1/2] NFSv4/pNFS: prevent i_size regression while layoutcommit " Lucheng Bao
2026-10-09 4:43 ` Trond Myklebust
2026-10-12 20:43 ` Lucheng Bao
2026-10-08 22:28 ` [PATCH 2/2] NFSv4/pNFS: defer LAYOUTRETURN after an unsuccessful OLD_STATEID refresh Lucheng Bao
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=20261008222843.63319-1-lubao@everpuredata.com \
--to=lubao@everpuredata.com \
--cc=anna@kernel.org \
--cc=jcurley@everpuredata.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=tmenninger@everpuredata.com \
--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
all inboxes | Powered by JetHome®