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:
parent
94d3878efb
commit
fbd8b456db
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user