From: Jeffle Xu <[email protected]>
To: [email protected]
Cc: [email protected], [email protected],
[email protected]
Subject: [PATCH v2] io_uring: use blk_queue_nowait() to check if NOWAIT supported
Date: Mon, 19 Oct 2020 16:59:42 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
commit 021a24460dc2 ("block: add QUEUE_FLAG_NOWAIT") adds a new helper
function blk_queue_nowait() to check if the bdev supports handling of
REQ_NOWAIT or not. Since then bio-based dm device can also support
REQ_NOWAIT, and currently only dm-linear supports that since
commit 6abc49468eea ("dm: add support for REQ_NOWAIT and enable it for
linear target").
Fixes: 4503b7676a2e ("io_uring: catch -EIO from buffered issue request failure")
Signed-off-by: Jeffle Xu <[email protected]>
---
fs/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 2e1dc354cd08..7d8615df3c01 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2601,7 +2601,7 @@ static struct file *__io_file_get(struct io_submit_state *state, int fd)
static bool io_bdev_nowait(struct block_device *bdev)
{
#ifdef CONFIG_BLOCK
- return !bdev || queue_is_mq(bdev_get_queue(bdev));
+ return !bdev || blk_queue_nowait(bdev_get_queue(bdev));
#else
return true;
#endif
--
2.27.0
next prev parent reply other threads:[~2020-10-19 8:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 8:47 [PATCH] io_uring: use blk_queue_nowait() to check if NOWAIT supported Jeffle Xu
2020-10-19 8:59 ` Jeffle Xu [this message]
2020-10-19 13:32 ` [PATCH v2] " Jens Axboe
2020-10-19 9:01 ` [PATCH] " JeffleXu
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox