master - pvmove: remove unusued code
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0f0dc1a2a5f779fbdae7bddd12c3e56397636833 Commit: 0f0dc1a2a5f779fbdae7bddd12c3e56397636833 Parent: b978f505ff05c3581ccc633442b04c5d391add04 Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri Nov 10 21:48:33 2017 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Wed Nov 15 21:00:29 2017 +0100
pvmove: remove unusued code
Support for snapshot and cache LVs should now work. Remove protection rejecting pvmove for them.
--- lib/locking/locking.c | 61 ------------------------------------------- lib/locking/locking.h | 4 --- tools/pvmove.c | 68 ------------------------------------------------- 3 files changed, 0 insertions(+), 133 deletions(-)
lib/locking/locking.c +0 -61
@@ -371,67 +371,6 @@ int lock_vol(struct cmd_context *cmd, const char *vol, uint32_t flags, const strreturn 1 ; } -/* Unlock list of LVs */ -int resume_lvs (struct cmd_context *cmd,struct dm_list *lvs) -{ -struct lv_list *lvl; -int r =1 ; - - dm_list_iterate_items(lvl, lvs) -if (!resume_lv (cmd, lvl->lv)) { - r =0 ; - stack; - } - -return r; -} - -/* Unlock and revert list of LVs */ -int revert_lvs (struct cmd_context *cmd,struct dm_list *lvs) -{ -struct lv_list *lvl; -int r =1 ; - - dm_list_iterate_items(lvl, lvs) -if (!revert_lv (cmd, lvl->lv)) { - r =0 ; - stack; - } - -return r; -} -/* -* Lock a list of LVs. -* On failure to lock any LV, calls vg_revert() if vg_to_revert is set and -* then unlocks any LVs on the list already successfully locked. -*/ -int suspend_lvs (struct cmd_context *cmd,struct dm_list *lvs, -struct volume_group *vg_to_revert) -{ -struct lv_list *lvl; - - dm_list_iterate_items(lvl, lvs) { -if (!suspend_lv (cmd, lvl->lv)) { -log_error ("Failed to suspend %s" ,display_lvname (lvl->lv)); -if (vg_to_revert) -vg_revert (vg_to_revert); -/* -* FIXME Should be -* dm_list_uniterate(lvh, lvs, &lvl->list) { -* lvl = dm_list_item(lvh, struct lv_list); -* but revert would need fixing to use identical tree deps first. -*/ - dm_list_iterate_items(lvl, lvs) -if (!revert_lv (cmd, lvl->lv)) - stack; - -return 0 ; - } - } - -return 1 ; -} -/* * First try to activate exclusively locally. * Then if the VG is clustered and the LV is not yet active (e.g. due to
lib/locking/locking.h +0 -4
@@ -262,10 +262,6 @@ int sync_dev_names(struct cmd_context* cmd);/* Process list of LVs */ struct volume_group ; -int suspend_lvs (struct cmd_context *cmd,struct dm_list *lvs, -struct volume_group *vg_to_revert); -int resume_lvs (struct cmd_context *cmd,struct dm_list *lvs); -int revert_lvs (struct cmd_context *cmd,struct dm_list *lvs);int activate_lvs (struct cmd_context *cmd,struct dm_list *lvs);#endif
tools/pvmove.c +0 -68
80 lines not on this page · raw message