ext4: add RWF_DONTCACHE write support buffered-uncached-fs.10
authorJens Axboe <axboe@kernel.dk>
Sat, 9 Nov 2024 16:51:58 +0000 (09:51 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 20 Dec 2024 15:30:55 +0000 (08:30 -0700)
commit98b00877f5f4bf4c86a1a396261c1e70006361f5
tree7ebe294c09a70d9aecd22f0cc8d03cc6c5e6b977
parent7dfbc3f152f1706c93f456a2cc5dee0117427d1d
ext4: add RWF_DONTCACHE write support

IOCB_DONTCACHE IO needs to prune writeback regions on IO completion,
and hence need the worker punt that ext4 also does for unwritten
extents. Add an io_end flag to manage that.

If foliop is set to foliop_uncached in ext4_write_begin(), then set
FGP_DONTCACHE so that __filemap_get_folio() will mark newly created
folios as uncached. That in turn will make writeback completion drop
these ranges from the page cache.

Now that ext4 supports both uncached reads and writes, add the fop_flag
FOP_DONTCACHE to enable it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/ext4/ext4.h
fs/ext4/file.c
fs/ext4/inline.c
fs/ext4/inode.c
fs/ext4/page-io.c