* Fwd: [RFC 2/2] io_uring: mark REQ_NOWAIT for a non-mq queue as unspported
[not found] <1589925170-48687-3-git-send-email-bijan.mottahedeh@oracle.com>
@ 2020-05-19 22:16 ` Jens Axboe
2020-05-20 17:50 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Jens Axboe @ 2020-05-19 22:16 UTC (permalink / raw)
To: linux-block
-------- Forwarded Message --------
Subject: [RFC 2/2] io_uring: mark REQ_NOWAIT for a non-mq queue as unspported
Date: Tue, 19 May 2020 14:52:50 -0700
From: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
To: axboe@kernel.dk
CC: io-uring@vger.kernel.org
Mark a REQ_NOWAIT request for a non-mq queue as unspported instead of
retryable since otherwise the io_uring layer will keep resubmitting
the request.
Signed-off-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
---
block/blk-core.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/block/blk-core.c b/block/blk-core.c
index 5847993..3807140 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -962,14 +962,10 @@ static inline blk_status_t blk_check_zone_append(struct request_queue *q,
}
/*
- * Non-mq queues do not honor REQ_NOWAIT, so complete a bio
- * with BLK_STS_AGAIN status in order to catch -EAGAIN and
- * to give a chance to the caller to repeat request gracefully.
+ * Non-mq queues do not honor REQ_NOWAIT, return -EOPNOTSUPP.
*/
- if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q)) {
- status = BLK_STS_AGAIN;
- goto end_io;
- }
+ if ((bio->bi_opf & REQ_NOWAIT) && !queue_is_mq(q))
+ goto not_supported;
if (should_fail_bio(bio))
goto end_io;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Fwd: [RFC 2/2] io_uring: mark REQ_NOWAIT for a non-mq queue as unspported
2020-05-19 22:16 ` Fwd: [RFC 2/2] io_uring: mark REQ_NOWAIT for a non-mq queue as unspported Jens Axboe
@ 2020-05-20 17:50 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2020-05-20 17:50 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block
On Tue, May 19, 2020 at 04:16:45PM -0600, Jens Axboe wrote:
>
>
>
> -------- Forwarded Message --------
> Subject: [RFC 2/2] io_uring: mark REQ_NOWAIT for a non-mq queue as unspported
> Date: Tue, 19 May 2020 14:52:50 -0700
> From: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
> To: axboe@kernel.dk
> CC: io-uring@vger.kernel.org
>
> Mark a REQ_NOWAIT request for a non-mq queue as unspported instead of
> retryable since otherwise the io_uring layer will keep resubmitting
> the request.
Someone needs to audit if this translates into the right errors message
for the syscalls, as they eventually need to return -EAGAIN
to userspace.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-20 17:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1589925170-48687-3-git-send-email-bijan.mottahedeh@oracle.com>
2020-05-19 22:16 ` Fwd: [RFC 2/2] io_uring: mark REQ_NOWAIT for a non-mq queue as unspported Jens Axboe
2020-05-20 17:50 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).