mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
lvconvert: correction for thin conversion
Updates for 39457234db1d92f89d4234e2f2f5b703206281ae. Off-by-one for option array - need 20 fields. Missed to clear lock_args for cachepool.
This commit is contained in:
parent
b3b6c6b576
commit
857f5d6e65
@ -462,7 +462,7 @@ int thin_pool_prepare_metadata(struct logical_volume *metadata_lv,
|
|||||||
char lv_path[PATH_MAX], md_path[64], buffer[512];
|
char lv_path[PATH_MAX], md_path[64], buffer[512];
|
||||||
const struct dm_config_node *cn;
|
const struct dm_config_node *cn;
|
||||||
const struct dm_config_value *cv;
|
const struct dm_config_value *cv;
|
||||||
const char *argv[19] = { /* Max supported 15 option args */
|
const char *argv[20] = { /* Max supported 15 option args */
|
||||||
find_config_tree_str_allow_empty(cmd, global_thin_restore_executable_CFG, NULL)
|
find_config_tree_str_allow_empty(cmd, global_thin_restore_executable_CFG, NULL)
|
||||||
};
|
};
|
||||||
int args = 0;
|
int args = 0;
|
||||||
|
@ -3398,13 +3398,11 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
|
|||||||
* data and meta LVs (they are unlocked and deleted below.)
|
* data and meta LVs (they are unlocked and deleted below.)
|
||||||
*/
|
*/
|
||||||
if (vg_is_shared(vg)) {
|
if (vg_is_shared(vg)) {
|
||||||
if (to_cachepool) {
|
pool_lv->lock_args = NULL;
|
||||||
data_lv->lock_args = NULL;
|
|
||||||
metadata_lv->lock_args = NULL;
|
|
||||||
} else {
|
|
||||||
data_lv->lock_args = NULL;
|
data_lv->lock_args = NULL;
|
||||||
metadata_lv->lock_args = NULL;
|
metadata_lv->lock_args = NULL;
|
||||||
|
|
||||||
|
if (!to_cachepool) {
|
||||||
if (!strcmp(vg->lock_type, "sanlock"))
|
if (!strcmp(vg->lock_type, "sanlock"))
|
||||||
pool_lv->lock_args = "pending";
|
pool_lv->lock_args = "pending";
|
||||||
else if (!strcmp(vg->lock_type, "dlm"))
|
else if (!strcmp(vg->lock_type, "dlm"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user