FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 05-04-2010, 04:01 AM
Mike Anderson
 
Default dm: Add feature flag to control call to blk_abort_queue

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

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 11:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org