summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc
diff options
context:
space:
mode:
authorTal Zussman <tz2294@columbia.edu>2026-10-09 12:50:14 -0400
committerJens Axboe <axboe@kernel.dk>2026-10-12 10:29:35 -0600
commit9fd1afea19fa7c4ba438a1d162739e0832073a4c (patch)
tree3bcfdbda890740bbf056464f673f1a0b9d8e9474 /rust/kernel/alloc
parent73a0ff6030afcae5aef9a8ebf9c27220f9be888e (diff)
block: don't fall back to buffered I/O for atomic writes
blkdev_direct_write() turns an -EBUSY from page cache invalidation into a 0 return, so an IOCB_ATOMIC write is retried in full through blkdev_buffered_write(), with no atomicity guarantee. Skip the buffered fallback in blkdev_write_iter() for IOCB_ATOMIC, as it already does for IOCB_NOWAIT, so the -EBUSY case returns -EAGAIN and the caller retries, matching __iomap_dio_rw(). ext4 has the same fallback and only warns in it. For block devices the fallback can be skipped before any I/O is submitted, so fail early instead. Fixes: caf336f81b3a ("block: Add fops atomic write support") Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://sashiko.dev/#/patchset/20260802-blkdev-fixes-v1-0-a82fc549fd74%40columbia.edu?part=2 Assisted-by: Claude:claude-fable-5 Reviewed-by: Hannes Reinecke <hare@kernel.org> Reviewed-by: John Garry <john.garry@linux.dev> Signed-off-by: Tal Zussman <tz2294@columbia.edu> Link: https://patch.msgid.link/20261009-blkdev-fixes-v6-6-307939c387df@columbia.edu Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'rust/kernel/alloc')
0 files changed, 0 insertions, 0 deletions