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

pvmove: move code from tools to lib

Move code manipulating with locking flags into /lib part of lvm.
This commit is contained in:
Zdenek Kabelac 2017-11-29 22:19:05 +01:00
parent 94d3878efb
commit fbd8b456db
2 changed files with 6 additions and 5 deletions

View File

@ -6633,6 +6633,12 @@ int remove_layers_for_segments_all(struct cmd_context *cmd,
if (!lv_empty(layer_lv))
return_0;
/* Assumes only used by PVMOVE ATM when unlocking LVs */
dm_list_iterate_items(lvl, lvs_changed) {
/* FIXME Assumes only one pvmove at a time! */
lvl->lv->status &= ~LOCKED;
}
return 1;
}

View File

@ -52,7 +52,6 @@ static int _detach_pvmove_mirror(struct cmd_context *cmd,
{
uint32_t mimage_to_remove = 0;
struct dm_list lvs_completed;
struct lv_list *lvl;
/* Update metadata to remove mirror segments and break dependencies */
dm_list_init(&lvs_completed);
@ -67,10 +66,6 @@ static int _detach_pvmove_mirror(struct cmd_context *cmd,
return_0;
}
dm_list_iterate_items(lvl, &lvs_completed)
/* FIXME Assumes only one pvmove at a time! */
lvl->lv->status &= ~LOCKED;
return 1;
}