iomap: make buffered writes work with RWF_DONTCACHE
authorJens Axboe <axboe@kernel.dk>
Tue, 5 Nov 2024 21:56:16 +0000 (14:56 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Dec 2024 15:25:49 +0000 (08:25 -0700)
commit4c99ec7de065e533d3d57ad0d3bd2b1f489b5a7f
tree6a68fe4b0ee4dde5a694557261b481f01f511197
parent741f20859a6cc2c56ecba7926b2149c4e7ff5dff
iomap: make buffered writes work with RWF_DONTCACHE

Add iomap buffered write support for RWF_DONTCACHE. If RWF_DONTCACHE is
set for a write, mark the folios being written as uncached. Then
writeback completion will drop the pages. The write_iter handler simply
kicks off writeback for the pages, and writeback completion will take
care of the rest.

This still needs the user of the iomap buffered write helpers to call
folio_end_dropbehind() upon successful issue of the writes.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/iomap/buffered-io.c
include/linux/iomap.h