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, 20 Dec 2024 15:30:54 +0000 (08:30 -0700)
commit8902ca04005825a3c5b26d2094901fa07fa9fa15
tree36069d4e0b7bf2c2367b6b2aaf4d5c3cbd6db0af
parent806b6ec14991743f46e093ba95231099d65e1967
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_write() upon successful issue of the writes.

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