ext4: add RWF_UNCACHED write support
authorJens Axboe <axboe@kernel.dk>
Sat, 9 Nov 2024 16:51:58 +0000 (09:51 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 14 Nov 2024 14:15:21 +0000 (07:15 -0700)
commita35eb9121be83a5cccb7e2c5a5094b852df18649
tree912841f2c0209f779b72ed12415ec5f7efe67b1c
parentbce05b335c1221d1a9be84bed4fccbae9e1e8d8d
ext4: add RWF_UNCACHED write support

IOCB_UNCACHED 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_UNCACHED 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_UNCACHED 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