]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: retry raw bdev writes if we hit -EOPNOTSUPP
authorJens Axboe <axboe@kernel.dk>
Fri, 7 Feb 2020 22:45:22 +0000 (15:45 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 8 Feb 2020 20:06:58 +0000 (13:06 -0700)
commita9477fa88c59d30924669415c16db3051d45f14a
treec72e65a137a614e78055b7460e96c719f9488bb0
parentf61932aa1f6c4b69280417b354c8341abb690d89
io_uring: retry raw bdev writes if we hit -EOPNOTSUPP

For non-blocking issue, we set IOCB_NOWAIT in the kiocb. However, on a
raw block device, this yields an -EOPNOTSUPP return, as non-blocking
writes aren't supported. Turn this -EOPNOTSUPP into -EAGAIN, so we retry
from blocking context with IOCB_NOWAIT cleared.

Cc: stable@vger.kernel.org # 5.5
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c