dm mpath: add ability to disable partition creation
From: Hannes Reinecke <hare@suse.de>
When multipath devices are being used as disks for VM Guests any
partition scanning / setup should be done within the VM Guest, not from
host. So we need to a mechanism to switch off partition scanning and
creation via kpartx.
The new 'no_partitions' feature serves as a notifier to kpartx to _not_
create partitions on these multipath devices.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
drivers/md/dm-mpath.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 0fc6849..1039e7f 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -85,6 +85,7 @@ struct multipath {
unsigned queue_if_no_path:1; /* Queue I/O if last path fails? */
unsigned saved_queue_if_no_path:1; /* Saved state during suspension */
unsigned use_default_hw_handler:1; /* Use attached device handler */
+ unsigned no_partitions:1; /* Avoid partition scanning */
unsigned pg_init_retries; /* Number of times to retry pg_init */
unsigned pg_init_count; /* Number of times pg_init called */
@@ -770,7 +771,7 @@ static int parse_features(struct dm_arg_set *as, struct multipath *m)
const char *arg_name;
static struct dm_arg _args[] = {
- {0, 6, "invalid number of feature args"},
+ {0, 7, "invalid number of feature args"},
{1, 50, "pg_init_retries must be between 1 and 50"},
{0, 60000, "pg_init_delay_msecs must be between 0 and 60000"},
};
@@ -796,6 +797,11 @@ static int parse_features(struct dm_arg_set *as, struct multipath *m)
continue;
}
if (!m->hw_handler_name || type == STATUSTYPE_INFO)
--
1.7.4.4
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
06-26-2012, 06:32 PM
Mike Snitzer
dm mpath: add ability to disable partition creation
From: Hannes Reinecke <hare@suse.de>
When multipath devices are being used as disks for VM Guests any
partition scanning / setup should be done within the VM Guest, not from
host. So we need to a mechanism to switch off partition scanning and
creation via kpartx.
The new 'no_partitions' feature serves as a notifier to kpartx to _not_
create partitions on these multipath devices.
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 4dd3f59..115ad9e 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -86,6 +86,7 @@ struct multipath {
unsigned queue_if_no_path:1; /* Queue I/O if last path fails? */
unsigned saved_queue_if_no_path:1; /* Saved state during suspension */
unsigned use_default_hw_handler:1; /* Use attached device handler */
+ unsigned no_partitions:1; /* Avoid partition scanning */
unsigned pg_init_retries; /* Number of times to retry pg_init */
unsigned pg_init_count; /* Number of times pg_init called */
@@ -772,7 +773,7 @@ static int parse_features(struct dm_arg_set *as, struct multipath *m)
const char *arg_name;
static struct dm_arg _args[] = {
- {0, 6, "invalid number of feature args"},
+ {0, 7, "invalid number of feature args"},
{1, 50, "pg_init_retries must be between 1 and 50"},
{0, 60000, "pg_init_delay_msecs must be between 0 and 60000"},
};
@@ -798,6 +799,11 @@ static int parse_features(struct dm_arg_set *as, struct multipath *m)
continue;
}