master - lvremove: drop duplicate check for active LV
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f04abd1f8a7eea9edf473be17ae1e2aea1a00ee6 Commit: f04abd1f8a7eea9edf473be17ae1e2aea1a00ee6 Parent: 23de09aeb87ec10bd1a553ea8868e2f946117232 Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Mar 6 13:31:06 2018 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Mar 6 15:40:31 2018 +0100
lvremove: drop duplicate check for active LV
Since this code branch already tested LV is active, avoid repeating same query.
--- WHATS_NEW | 1 + lib/metadata/lv_manip.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.178 - ===================================== + Skip duplicate check for active LV when prompting for its removal. Activate correct lock holding LV when it is cached. Do not modify archived metadata when removing striped raid. Fix memleak on error path when obtaining lv_raid_data_offset.
lib/metadata/lv_manip.c +1 -2
@@ -6040,8 +6040,7 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,if ((force ==PROMPT ) && !lv_is_pending_delete (lv) && -lv_is_visible (lv) && -lv_is_active (lv)) { +lv_is_visible (lv)) { if (yes_no_prompt("Do you really want to remove%s active " "%slogical volume %s? [y/n]: ", ask_discard ? " and DISCARD" : "",