* Request: 38273e7b153d ("direct-io: remove IOCB_NOWAIT support") for 6.1, 6.6, 6.12 and 6.18
@ 2026-12-02 19:37 Nico Schmidt
2026-12-03 13:47 ` Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: Nico Schmidt @ 2026-12-02 19:37 UTC (permalink / raw)
To: stable@vger.kernel.org
Cc: hch@lst.de, axboe@kernel.dk, joseph.qi@linux.alibaba.com,
heming.zhao@suse.com, ocfs2-devel@lists.linux.dev
Hi,
please consider 38273e7b153d ("direct-io: remove IOCB_NOWAIT support")
for the 6.1, 6.6, 6.12 and 6.18 trees. It went into 7.1 as a dead code
removal, but it also fixes a real bug: O_DIRECT writes through io_uring
fail with EIO on ocfs2 when the device is dm-multipath.
How it happens on the trees above:
- ocfs2_file_open() sets FMODE_NOWAIT, so io_uring first issues each
write with IOCB_NOWAIT.
- ocfs2 uses the legacy fs/direct-io.c, which sets REQ_NOWAIT on write
bios when IOCB_NOWAIT is set.
- dm-multipath does not support REQ_NOWAIT, so submit_bio_noacct() ends
the bio with BLK_STS_NOTSUPP.
- dio_bio_complete() maps every status except BLK_STS_AGAIN to -EIO, so
the write fails with EIO ("ocfs2_dio_end_io ... Direct IO failed,
bytes = -5") instead of returning -EAGAIN for io_uring to retry.
Writes that need new clusters return -EAGAIN earlier in ocfs2 and are
fine; writes into already allocated space fail. In practice this hits
QEMU guests whose qcow2 images sit on ocfs2 over multipath with
aio=io_uring, which Proxmox VE uses by default for directory storages.
The guest sees write errors and remounts read-only. A plain SCSI path
supports REQ_NOWAIT and is not affected.
The commit message says that no filesystem using the legacy direct I/O
code sets FMODE_NOWAIT; ocfs2 does (since 4.17), which is how the
removal fixed this.
Reproducer, any ocfs2 volume (cluster or local mode) on a dm-multipath
map:
fio --name=t --filename=/mnt/ocfs2/f --ioengine=io_uring --direct=1 \
--rw=write --bs=64k --size=64m --iodepth=1 --fallocate=none
fails with EIO at offset 65536. With --force_async=1, or with libaio
or pvsync2, it passes.
Tested on a two-path iSCSI LUN with dm-multipath:
- Proxmox VE kernel 7.0.14 (7.0 based): fails
- next-20261127 (contains the commit): passes
- 6.18.66: fails (qemu-io growing a qcow2 with aio=io_uring, cluster
and local mode, and the fio run above)
- 6.18.66 + 38273e7b153d: passes, same runs; libaio, pvsync2 and
RWF_NOWAIT behave as before (RWF_NOWAIT still gets EAGAIN)
The commit applies cleanly to 6.1.y, 6.6.y, 6.12.y and 6.18.y.
The testing and the analysis were done with the help of an AI coding
assistant (Claude); I reviewed the analysis and checked the results
myself.
Regards,
Nico Schmidt
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Request: 38273e7b153d ("direct-io: remove IOCB_NOWAIT support") for 6.1, 6.6, 6.12 and 6.18
2026-12-02 19:37 Request: 38273e7b153d ("direct-io: remove IOCB_NOWAIT support") for 6.1, 6.6, 6.12 and 6.18 Nico Schmidt
@ 2026-12-03 13:47 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2026-12-03 13:47 UTC (permalink / raw)
To: stable@vger.kernel.org
Cc: Sasha Levin, hch@lst.de, axboe@kernel.dk,
joseph.qi@linux.alibaba.com, heming.zhao@suse.com,
ocfs2-devel@lists.linux.dev, Nico Schmidt
> please consider 38273e7b153d ("direct-io: remove IOCB_NOWAIT support")
> for the 6.1, 6.6, 6.12 and 6.18 trees.
Queued for 6.18, 6.12, 6.6 and 6.1, thanks.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-03 13:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 19:37 Request: 38273e7b153d ("direct-io: remove IOCB_NOWAIT support") for 6.1, 6.6, 6.12 and 6.18 Nico Schmidt
2026-12-03 13:47 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox