diff options
| author | Viacheslav Dubeyko <slava@dubeyko.com> | 2026-07-24 15:27:45 -0700 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-07-27 11:43:15 +0200 |
| commit | b924d8d4e54f179bccd9f28f57a2c4fbb570c04a (patch) | |
| tree | 2ea9342d51073b860f44ad40301448314cc344af /scripts/Makefile.thinlto | |
| parent | e7b2c51c3fedd68bf97d9a49cfbe76b240aee41d (diff) | |
| download | linux-next-b924d8d4e54f179bccd9f28f57a2c4fbb570c04a.tar.gz linux-next-b924d8d4e54f179bccd9f28f57a2c4fbb570c04a.zip | |
nilfs2: switch O_DIRECT reads to iomap
Wire the read-only nilfs_iomap_ops added in the previous patch into
the O_DIRECT read path, and eliminate blockdev_direct_IO() from
nilfs2 entirely:
- nilfs_file_open() now sets FMODE_CAN_ODIRECT explicitly, since
permission to open the file O_DIRECT was previously implied by
aops->direct_IO being non-NULL.
- nilfs_file_read_iter() dispatches O_DIRECT reads to iomap_dio_rw()
using nilfs_iomap_ops; everything else still goes through
generic_file_read_iter() as before.
- nilfs_file_write_iter() strips IOCB_DIRECT and falls through to
generic_file_write_iter()'s ordinary buffered path. NILFS2 cannot
perform true direct I/O writes: new blocks are delay-allocated and
only given a real disk address by the segment constructor, which
works on buffer_head lists, not iomap. This reproduces today's
actual behavior: the old nilfs_direct_IO() already just returned 0
for WRITE.
- nilfs_direct_IO() and the .direct_IO callback on nilfs_aops are
removed.
- drop the unnecessary "select LEGACY_DIRECT_IO" from Kconfig
in favor of "select FS_IOMAP".
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Link: https://patch.msgid.link/20260724222745.2107464-3-slava@dubeyko.com
Acked-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
cc: Christoph Hellwig <hch@lst.de>
cc: Ryusuke Konishi <konishi.ryusuke@gmail.com>
cc: linux-nilfs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
