Skip to contentSkip to conversation

dev-dct-process-latest - toollib: print ignoring vorigin

PATCH David Teigland 1 participant 1 message Sep 22, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6be399b5ebb0f9a0e0d345747d1c164cc3911e2e
Commit:        6be399b5ebb0f9a0e0d345747d1c164cc3911e2e
Parent:        57d65e0681aeba46f221cea7e5686d531f4f53ae
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Sep 4 13:31:17 2014 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Mon Sep 22 10:32:24 2014 -0500

toollib: print ignoring vorigin

When ignoring 'listed' volume, print info message. (So the final command error message is a bit less confusing, i.e. when user tries to deactive virtual origin:

Quoted 1 line

lvchange -an vg/lvol2_vorigin

Ignoring virtual origin logical volume vg/lvol2_vorigin. One or more specified logical volume(s) not found.

(Reapplied after revert.)

---
 tools/toollib.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
tools/toollib.c +7 -1
index 903ea19..0c671ac 100644
@@ -1505,8 +1505,14 @@ int process_each_lv_in_vg(struct cmd_context *cmd,
 		    lv_is_cow(lvl->lv) && !lv_is_virtual_origin(origin_from_cow(lvl->lv)))
 			continue;
 
-		if (lv_is_virtual_origin(lvl->lv) && !arg_count(cmd, all_ARG))
+		if (lv_is_virtual_origin(lvl->lv) && !arg_count(cmd, all_ARG)) {
+			if (lvargs_supplied &&
+			    str_list_match_item(arg_lvnames, lvl->lv->name))
+				log_print_unless_silent("Ignoring virtual origin logical 
+							display_lvname(lvl->lv));
+
 			continue;
+		}
 
 		/*
 		 * Only let hidden LVs through it --all was used or the LVs