1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvmlockd: enable lvcreate of thin pool and thin lv in one command

Previously, thin pools and thin lvs need needed to be
created with separate commands, now the combined command
is permitted.
This commit is contained in:
David Teigland 2018-05-25 12:53:53 -05:00
parent db8d3bdfa9
commit 948f2d9979
2 changed files with 7 additions and 2 deletions

View File

@ -8025,8 +8025,14 @@ struct logical_volume *lv_create_single(struct volume_group *vg,
if (!(lp->segtype = get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_THIN_POOL)))
return_NULL;
/* We want a lockd lock for the new thin pool, but not the thin lv. */
lp->needs_lockd_init = 1;
if (!(lv = _lv_create_an_lv(vg, lp, lp->pool_name)))
return_NULL;
lp->needs_lockd_init = 0;
} else if (seg_is_cache(lp)) {
if (!lp->origin_name) {
/* Until we have --pooldatasize we are lost */

View File

@ -1638,8 +1638,7 @@ static int _lvcreate_single(struct cmd_context *cmd, const char *vg_name,
lp->snapshot ? lp->origin_name : "", lp->segtype->name);
if (is_lockd_type(vg->lock_type)) {
if (cmd->command->command_enum == lvcreate_thin_vol_and_thinpool_CMD ||
cmd->command->command_enum == lvcreate_cachepool_CMD ||
if (cmd->command->command_enum == lvcreate_cachepool_CMD ||
cmd->command->command_enum == lvcreate_cache_vol_with_new_origin_CMD ||
cmd->command->command_enum == lvcreate_thin_vol_with_thinpool_or_sparse_snapshot_CMD ||
cmd->command->command_enum == lvcreate_cache_vol_with_new_origin_or_convert_to_cache_vol_with_cachepool_CMD) {