From: Ojaswin Mujoo <ojaswin@linux.ibm.com>
To: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: djwong@kernel.org, john.g.garry@oracle.com, willy@infradead.org,
hch@lst.de, ritesh.list@gmail.com, jack@suse.cz,
Luis Chamberlain <mcgrof@kernel.org>,
dgc@kernel.org, tytso@mit.edu, p.raghav@samsung.com,
andres@anarazel.de, linux-kernel@vger.kernel.org
Subject: [RFC 0/3] Add buffered write-through support to iomap & xfs
Date: Mon, 9 Mar 2026 23:04:30 +0530 [thread overview]
Message-ID: <cover.1773076216.git.ojaswin@linux.ibm.com> (raw)
Hi all,
This patchset implements an early design prototype of buffered I/O
write-through semantics in linux.
This idea mainly picked up traction to enable RWF_ATOMIC buffered IO [1],
however write-through path can have many use cases beyond atomic writes,
- such as enabling truly async AIO buffered I/O when issued with O_DSYNC
- better scalability for buffered I/O
The implementation of write-through combines the buffered IO frontend
with async dio backend, which leads to some interesting interactions.
I've added most of the design notes in respective patches. Please note
that this is an initial RFC to iron out any early design issues. This is
largely based on suggestions from Dave an Jan in [1] so thanks for the
pointers!
* Testing Notes *
- I've added support for RWF_WRITETHROUGH to fsx and fsstress in
xfstests and these patches survive fsx with integrity verification as
well as fsstress parallel stressing.
- -g quick with blocks size == page size and blocksize < pagesize shows
no new regressions.
* Design TODOs *
- Evaluate if we need to tag page cache dirty bit in xarray, since
PG_Writeback is already set on the folio.
- As mentioned in patch 2, we call ->iomap_begin() twice which is not
ideal but is kept this way to avoid churn and keep the PoC minimal.
Look into a better way to refactor this.
- Fix support with filesystem freezing.
* Future work (once design is finalized) *
- Add aio O_DSYNC buffered write-through support
- Add RWF_ATOMIC support for buffered IO via write-through path
- Add support of other RWF_ flags for write-through buffered I/O path including
- Benchmarking numbers and more thorough testing needed.
As usual, thoughts and suggestions are welcome.
[1] https://lore.kernel.org/all/d0c4d95b-8064-4a7e-996d-7ad40eb4976b@linux.dev/
Regards,
ojaswin
Ojaswin Mujoo (3):
iomap: Support buffered RWF_WRITETHROUGH via async dio backend
iomap: Enable stable writes for RWF_WRITETHROUGH inodes
xfs: Add RWF_WRITETHROUGH support to xfs
fs/inode.c | 1 +
fs/iomap/buffered-io.c | 414 ++++++++++++++++++++++++++++++++++++++++
fs/iomap/direct-io.c | 64 ++++---
fs/xfs/xfs_file.c | 68 ++++++-
include/linux/fs.h | 9 +
include/linux/iomap.h | 34 ++++
include/uapi/linux/fs.h | 5 +-
7 files changed, 568 insertions(+), 27 deletions(-)
--
2.52.0
next reply other threads:[~2026-03-09 17:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-09 17:34 Ojaswin Mujoo [this message]
2026-03-09 17:34 ` [RFC 1/3] iomap: Support buffered RWF_WRITETHROUGH via async dio backend Ojaswin Mujoo
2026-03-10 6:48 ` Dave Chinner
2026-03-11 10:35 ` Ojaswin Mujoo
2026-03-11 12:05 ` Dave Chinner
2026-03-13 7:43 ` Ojaswin Mujoo
2026-03-09 17:34 ` [RFC 2/3] iomap: Enable stable writes for RWF_WRITETHROUGH inodes Ojaswin Mujoo
2026-03-10 3:57 ` Darrick J. Wong
2026-03-10 5:25 ` Ritesh Harjani
2026-03-11 6:27 ` Ojaswin Mujoo
2026-03-09 17:34 ` [RFC 3/3] xfs: Add RWF_WRITETHROUGH support to xfs Ojaswin Mujoo
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.1773076216.git.ojaswin@linux.ibm.com \
--to=ojaswin@linux.ibm.com \
--cc=andres@anarazel.de \
--cc=dgc@kernel.org \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=john.g.garry@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=p.raghav@samsung.com \
--cc=ritesh.list@gmail.com \
--cc=tytso@mit.edu \
--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