summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2016-07-30 15:56:17 +0100
committerAlasdair G Kergon <agk@redhat.com>2016-07-30 15:58:09 +0100
commit1ce958bc5ea2827fdb945b2177616e8f253486a1 (patch)
treecbbe4e6252f1c5fa0ca62a9bb1c5f21af652d154
parent48d9c46daabd73c694404c48d3820c2a229f1ad2 (diff)
downloadlvm2-1ce958bc5ea2827fdb945b2177616e8f253486a1.tar.gz
lvconvert: Rely upon lp->thin and lp->cache.
-rw-r--r--tools/lvconvert.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 822df5351..ed3bd8807 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -4072,7 +4072,7 @@ static int _convert_thin_pool(struct cmd_context *cmd, struct logical_volume *lv
if (arg_is_set(cmd, uncache_ARG))
return _convert_thin_pool_uncache(cmd, lv, lp);
- if (!strcmp(lp->type_str, SEG_TYPE_NAME_CACHE) || arg_is_set(cmd, cache_ARG))
+ if (lp->cache)
return _convert_thin_pool_cache(cmd, lv, lp);
if (arg_is_set(cmd, repair_ARG))
@@ -4216,10 +4216,10 @@ static int _convert_raid(struct cmd_context *cmd, struct logical_volume *lv,
if (!strcmp(lp->type_str, SEG_TYPE_NAME_SNAPSHOT) || arg_is_set(cmd, snapshot_ARG))
return _convert_raid_snapshot(cmd, lv, lp);
- if (!strcmp(lp->type_str, SEG_TYPE_NAME_THIN) || arg_is_set(cmd, thin_ARG))
+ if (lp->thin)
return _convert_raid_thin(cmd, lv, lp);
- if (!strcmp(lp->type_str, SEG_TYPE_NAME_CACHE) || arg_is_set(cmd, cache_ARG))
+ if (lp->cache)
return _convert_raid_cache(cmd, lv, lp);
/* Using --thinpool is ambiguous and not preferred. */
@@ -4273,10 +4273,10 @@ static int _convert_striped(struct cmd_context *cmd, struct logical_volume *lv,
if (!strcmp(lp->type_str, SEG_TYPE_NAME_SNAPSHOT) || arg_is_set(cmd, snapshot_ARG))
return _convert_striped_snapshot(cmd, lv, lp);
- if (!strcmp(lp->type_str, SEG_TYPE_NAME_THIN) || lp->thin)
+ if (lp->thin)
return _convert_striped_thin(cmd, lv, lp);
- if (!strcmp(lp->type_str, SEG_TYPE_NAME_CACHE) || arg_is_set(cmd, cache_ARG))
+ if (lp->cache)
return _convert_striped_cache(cmd, lv, lp);
/* Using --thinpool is ambiguous and not preferred. */