Skip to content

Commit 927069c

Browse files
committed
Revert "io_uring/rw: drop -EOPNOTSUPP check in __io_complete_rw_common()"
This reverts commit 90bfb28. Kevin reports that this commit causes an issue for him with LVM snapshots, most likely because of turning off NOWAIT support while a snapshot is being created. This makes -EOPNOTSUPP bubble back through the completion handler, where io_uring read/write handling should just retry it. Reinstate the previous check removed by the referenced commit. Cc: [email protected] Fixes: 90bfb28 ("io_uring/rw: drop -EOPNOTSUPP check in __io_complete_rw_common()") Reported-by: Salvatore Bonaccorso <[email protected]> Reported-by: Kevin Lumik <[email protected]> Link: https://lore.kernel.org/io-uring/[email protected]/ Signed-off-by: Jens Axboe <[email protected]>
1 parent 3a86608 commit 927069c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

io_uring/rw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ static void __io_complete_rw_common(struct io_kiocb *req, long res)
542542
{
543543
if (res == req->cqe.res)
544544
return;
545-
if (res == -EAGAIN && io_rw_should_reissue(req)) {
545+
if ((res == -EOPNOTSUPP || res == -EAGAIN) && io_rw_should_reissue(req)) {
546546
req->flags |= REQ_F_REISSUE | REQ_F_BL_NO_RECYCLE;
547547
} else {
548548
req_set_fail(req);

0 commit comments

Comments
 (0)