From: Mike Anderson <andmike@linux.vnet.ibm.com>
To: dm-devel@redhat.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH 2/2] dm: Add feature flag to control call to blk_abort_queue
Date: Mon, 3 May 2010 21:01:31 -0700 [thread overview]
Message-ID: <1272945691-31649-3-git-send-email-andmike@linux.vnet.ibm.com> (raw)
In-Reply-To: <1272945691-31649-1-git-send-email-andmike@linux.vnet.ibm.com>
Add feature flag for no_abort_q.
Signed-off-by: Mike Anderson <andmike@linux.vnet.ibm.com>
---
drivers/md/dm-mpath.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 4200d03..e55cb41 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -119,6 +119,10 @@ static void trigger_event(struct work_struct *work);
static void activate_path(struct work_struct *work);
static void deactivate_path(struct work_struct *work);
+enum multipath_feature_flags {
+ MP_FEATURE_NO_ABORT_Q = 0,
+};
+
static int multipath_test_feature(struct multipath *m, unsigned feature)
{
return test_bit(feature, &m->features);
@@ -156,7 +160,8 @@ static void deactivate_path(struct work_struct *work)
struct pgpath *pgpath =
container_of(work, struct pgpath, deactivate_path);
- blk_abort_queue(pgpath->path.dev->bdev->bd_disk->queue);
+ if (!multipath_test_feature(pgpath->pg->m, MP_FEATURE_NO_ABORT_Q))
+ blk_abort_queue(pgpath->path.dev->bdev->bd_disk->queue);
}
static struct priority_group *alloc_priority_group(void)
@@ -822,6 +827,11 @@ static int parse_features(struct arg_set *as, struct multipath *m)
continue;
}
+ if (!strnicmp(param_name, MESG_STR("no_abort_q"))) {
+ multipath_set_feature(m, MP_FEATURE_NO_ABORT_Q);
+ continue;
+ }
+
if (!strnicmp(param_name, MESG_STR("pg_init_retries")) &&
(argc >= 1)) {
r = read_param(_params + 1, shift(as),
@@ -1381,11 +1391,14 @@ static int multipath_status(struct dm_target *ti, status_type_t type,
DMEMIT("2 %u %u ", m->queue_size, m->pg_init_count);
else {
DMEMIT("%u ", m->queue_if_no_path +
- (m->pg_init_retries > 0) * 2);
+ (m->pg_init_retries > 0) * 2 +
+ multipath_test_feature(m, MP_FEATURE_NO_ABORT_Q));
if (m->queue_if_no_path)
DMEMIT("queue_if_no_path ");
if (m->pg_init_retries)
DMEMIT("pg_init_retries %u ", m->pg_init_retries);
+ if (multipath_test_feature(m, MP_FEATURE_NO_ABORT_Q))
+ DMEMIT("no_abort_q ");
}
if (!m->hw_handler_name || type == STATUSTYPE_INFO)
--
1.6.6.1
next prev parent reply other threads:[~2010-05-04 4:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 4:01 [PATCH 0/2] dm: Add no_abort_q feature flag to dm-mpath Mike Anderson
2010-05-04 4:01 ` [PATCH 1/2] dm: Add feature flags " Mike Anderson
2010-05-05 20:01 ` Mike Snitzer
2010-05-05 23:04 ` [dm-devel] " Mike Anderson
2010-05-04 4:01 ` Mike Anderson [this message]
2010-05-05 23:19 ` [PATCH 0/2] dm: Add no_abort_q feature flag " Moger, Babu
2010-05-06 1:39 ` Mike Anderson
2010-05-06 14:38 ` Moger, Babu
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=1272945691-31649-3-git-send-email-andmike@linux.vnet.ibm.com \
--to=andmike@linux.vnet.ibm.com \
--cc=dm-devel@redhat.com \
--cc=linux-scsi@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 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).