From: Goldwyn Rodrigues <rgoldwyn@suse.de>
To: linux-block@vger.kernel.org
Cc: axboe@kernel.dk, shli@kernel.org, Goldwyn Rodrigues <rgoldwyn@suse.com>
Subject: [PATCH 9/9] dm-mpath: Add nowait support
Date: Wed, 4 Oct 2017 08:55:11 -0500 [thread overview]
Message-ID: <20171004135511.26110-10-rgoldwyn@suse.de> (raw)
In-Reply-To: <20171004135511.26110-1-rgoldwyn@suse.de>
From: Goldwyn Rodrigues <rgoldwyn@suse.com>
If there are no queues, bail if REQ_NOWAIT is set instead
of queueing up I/O.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
drivers/md/dm-mpath.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 11f273d2f018..d714c1b1b066 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -542,6 +542,11 @@ static int __multipath_map_bio(struct multipath *m, struct bio *bio, struct dm_m
if ((pgpath && queue_io) ||
(!pgpath && test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags))) {
+ /* Bail if nowait is set */
+ if (bio->bi_opf & REQ_NOWAIT) {
+ bio_wouldblock_error(bio);
+ return DM_MAPIO_SUBMITTED;
+ }
/* Queue for the daemon to resubmit */
spin_lock_irqsave(&m->lock, flags);
bio_list_add(&m->queued_bios, bio);
--
2.14.2
next prev parent reply other threads:[~2017-10-04 13:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-04 13:55 [PATCH v2 0/9] Nowait support for stacked block devices Goldwyn Rodrigues
2017-10-04 13:55 ` [PATCH 1/9] QUEUE_FLAG_NOWAIT to indicate device supports nowait Goldwyn Rodrigues
2017-10-04 13:55 ` [PATCH 2/9] md: Add nowait support to md Goldwyn Rodrigues
2017-10-04 13:55 ` [PATCH 3/9] md: raid1 nowait support Goldwyn Rodrigues
2017-10-04 13:55 ` [PATCH 4/9] md: raid10 " Goldwyn Rodrigues
2017-10-04 13:55 ` [PATCH 5/9] md: raid5 " Goldwyn Rodrigues
2017-10-04 13:55 ` [PATCH 6/9] dm: add " Goldwyn Rodrigues
2017-10-04 13:55 ` [PATCH 7/9] dm: Add nowait support to raid1 Goldwyn Rodrigues
2017-10-04 13:55 ` [PATCH 8/9] dm: Add nowait support to dm-delay Goldwyn Rodrigues
2017-10-04 13:55 ` Goldwyn Rodrigues [this message]
2017-10-05 17:19 ` [PATCH v2 0/9] Nowait support for stacked block devices Shaohua Li
2017-10-06 12:01 ` Goldwyn Rodrigues
2017-10-10 22:36 ` Shaohua Li
-- strict thread matches above, loose matches on Subject: below --
2017-07-26 23:57 [PATCH 0/9] Nowait feature " Goldwyn Rodrigues
2017-07-26 23:58 ` [PATCH 9/9] dm-mpath: Add nowait support Goldwyn Rodrigues
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=20171004135511.26110-10-rgoldwyn@suse.de \
--to=rgoldwyn@suse.de \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=rgoldwyn@suse.com \
--cc=shli@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox