All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Fwd: [RFC 2/2] io_uring: mark REQ_NOWAIT for a non-mq queue as unspported
Date: Tue, 19 May 2020 16:16:45 -0600	[thread overview]
Message-ID: <3503f837-0958-0a55-ab7b-d4f1c7131179@kernel.dk> (raw)
In-Reply-To: <1589925170-48687-3-git-send-email-bijan.mottahedeh@oracle.com>




-------- 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


  reply	other threads:[~2020-05-19 22:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 21:52 [RFC 0/2] io_uring: don't use kiocb.private to store buf_index Bijan Mottahedeh
2020-05-19 21:52 ` [RFC 1/2] " Bijan Mottahedeh
2020-05-19 22:07   ` Jens Axboe
2020-05-19 22:20     ` Jens Axboe
2020-05-19 22:48       ` Bijan Mottahedeh
2020-05-19 21:52 ` [RFC 2/2] io_uring: mark REQ_NOWAIT for a non-mq queue as unspported Bijan Mottahedeh
2020-05-19 22:16   ` Jens Axboe [this message]
2020-05-20 17:50     ` Fwd: " Christoph Hellwig
2020-05-28 18:35   ` Jeff Moyer
2020-05-28 19:01     ` Jens Axboe
2020-05-28 19:22       ` Jens Axboe
2020-05-28 19:31         ` Jeff Moyer
2020-05-28 22:12         ` Jeff Moyer
2020-05-28 23:03           ` Jens Axboe
2020-05-29 15:02             ` Jeff Moyer
2020-05-29 16:20               ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3503f837-0958-0a55-ab7b-d4f1c7131179@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.