master - activate_lvs: deactivate on uniterate
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c820b43fc053689eac0a60cd732347c8eb30ad5d Commit: c820b43fc053689eac0a60cd732347c8eb30ad5d Parent: eab9097b46b10ce61344c02934fe5c44b9f8c7c7 Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Nov 14 11:35:50 2017 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Wed Nov 15 12:11:33 2017 +0100
activate_lvs: deactivate on uniterate
When activation of LVs fails prior pvmove start, try to deactivate already activated LVs.
TODO: possibly remember which LVs where already activate and only those take down - devices which are already in-use will stay active.
--- WHATS_NEW | 1 + lib/locking/locking.c | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.177 - ==================================== + Deactivate activated LVs on error path when pvmove activation fails. Add "io" to log/debug_classes for logging low-level I/O. Eliminate redundant nested VG metadata in VG struct. Avoid importing persistent filter in vgscan/pvscan/vgrename.
lib/locking/locking.c +1 -1
@@ -475,7 +475,7 @@ int activate_lvs(struct cmd_context *cmd, struct dm_list *lvs, unsigned exclusivlog_error ("Failed to activate %s" , lvl->lv->name); dm_list_uniterate(lvh, lvs, &lvl->list) { lvl = dm_list_item(lvh, struct lv_list); -if (!activate_lv (cmd, lvl->lv)) +if (!deactivate_lv (cmd, lvl->lv)) stack; }return 0 ;