diff options
author | Mike Snitzer <snitzer@redhat.com> | 2016-02-06 18:38:46 -0500 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2016-02-22 11:06:21 -0500 |
commit | f083b09b7819c785db4f82a81f68da3bccfb04bf (patch) | |
tree | 894fade789e2499a0bd16cb82c2b9ff21982b043 /drivers/md/dm-ioctl.c | |
parent | e522c039059b0fdf5ecd15d7007026326fffc9be (diff) |
dm: set DM_TARGET_WILDCARD feature on "error" target
The DM_TARGET_WILDCARD feature indicates that the "error" target may
replace any target; even immutable targets. This feature will be useful
to preserve the ability to replace the "multipath" target even once it
is formally converted over to having the DM_TARGET_IMMUTABLE feature.
Also, implicit in the DM_TARGET_WILDCARD feature flag being set is that
.map, .map_rq, .clone_and_map_rq and .release_clone_rq are all defined
in the target_type.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-ioctl.c')
-rw-r--r-- | drivers/md/dm-ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 80a439543259..4763c4ae30e4 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -1291,7 +1291,8 @@ static int table_load(struct dm_ioctl *param, size_t param_size) | |||
1291 | 1291 | ||
1292 | immutable_target_type = dm_get_immutable_target_type(md); | 1292 | immutable_target_type = dm_get_immutable_target_type(md); |
1293 | if (immutable_target_type && | 1293 | if (immutable_target_type && |
1294 | (immutable_target_type != dm_table_get_immutable_target_type(t))) { | 1294 | (immutable_target_type != dm_table_get_immutable_target_type(t)) && |
1295 | !dm_table_get_wildcard_target(t)) { | ||
1295 | DMWARN("can't replace immutable target type %s", | 1296 | DMWARN("can't replace immutable target type %s", |
1296 | immutable_target_type->name); | 1297 | immutable_target_type->name); |
1297 | r = -EINVAL; | 1298 | r = -EINVAL; |