1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

lvconvert: Rely upon lp->thin and lp->cache.

This commit is contained in:
Alasdair G Kergon 2016-07-30 15:56:17 +01:00
parent 48d9c46daa
commit 1ce958bc5e

View File

@ -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. */