From: Jiale Yao <yaojiale02@163.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>,
Carlos Maiolino <cem@kernel.org>,
Damien Le Moal <dlemoal@kernel.org>,
Naohiro Aota <naohiro.aota@wdc.com>,
Johannes Thumshirn <jth@kernel.org>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Jan Kara <jack@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Eric Biggers <ebiggers@google.com>,
Dave Chinner <david@fromorbit.com>,
"Darrick J. Wong" <djwong@kernel.org>,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH 0/5] fs: drain in-flight DIO before buffered writes
Date: Sun, 25 Oct 2026 20:41:09 +0800 [thread overview]
Message-ID: <20261025124115.3178287-1-yaojiale02@163.com> (raw)
An asynchronous direct write can remain in flight after its submitting
thread releases the filesystem's I/O submission lock. If a buffered write
dirties page cache before that direct write completes, post-I/O page-cache
invalidation can find dirty pages, report possible data corruption, and
record -EIO in the mapping error sequence.
Drain in-flight DIO before buffered writes in the generic filemap path,
F2FS, XFS, and zonefs. The filemap change also protects UDF and other
users of __generic_file_write_iter(). Keep IOCB_NOWAIT requests
nonblocking by returning -EAGAIN when a drain would be required.
The patches are separated by common code or filesystem and remain
independently buildable in series order.
Jiale Yao (5):
filemap: drain in-flight DIO before buffered writes
f2fs: drain in-flight DIO before buffered writes
xfs: drain in-flight DIO before buffered writes
xfs: drain in-flight DIO before zoned buffered writes
zonefs: drain in-flight DIO before buffered writes
fs/f2fs/file.c | 13 +++++++++++--
fs/xfs/xfs_file.c | 22 ++++++++++++++++++++++
fs/zonefs/file.c | 8 ++++++++
mm/filemap.c | 9 +++++++++
4 files changed, 50 insertions(+), 2 deletions(-)
--
2.34.1
next reply other threads:[~2026-10-25 12:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 12:41 Jiale Yao [this message]
2026-10-25 12:41 ` [PATCH 1/5] filemap: " Jiale Yao
2026-10-26 13:31 ` Jan Kara
2026-10-27 14:52 ` Christoph Hellwig
2026-10-25 12:41 ` [PATCH 2/5] f2fs: " Jiale Yao
2026-10-25 12:41 ` [PATCH 3/5] xfs: " Jiale Yao
2026-10-26 0:52 ` Dave Chinner
2026-10-25 12:41 ` [PATCH 4/5] xfs: drain in-flight DIO before zoned " Jiale Yao
2026-10-25 12:41 ` [PATCH 5/5] zonefs: drain in-flight DIO before " Jiale Yao
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=20261025124115.3178287-1-yaojiale02@163.com \
--to=yaojiale02@163.com \
--cc=akpm@linux-foundation.org \
--cc=cem@kernel.org \
--cc=chao@kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=dlemoal@kernel.org \
--cc=ebiggers@google.com \
--cc=jack@suse.cz \
--cc=jaegeuk@kernel.org \
--cc=jth@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=naohiro.aota@wdc.com \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.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®