Skip to contentSkip to conversation

master - lvcreate: better logging for temporary device

PATCH Zdenek Kabelac 1 participant 1 message Oct 24, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f7cfea251c07b3a63131320cf4751b91480b9be7
Commit:        f7cfea251c07b3a63131320cf4751b91480b9be7
Parent:        2c057f33f3581aa29f79bb0a62c7115da30f8672
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Mon Oct 20 21:53:48 2014 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Oct 24 16:39:31 2014 +0200

lvcreate: better logging for temporary device

Hide creation of temporary LVs and print them only in verbose mode.

e.g. hides confusing message about creation of _pmspare device during creation of pool.

---
 WHATS_NEW               |    1 +
 lib/metadata/lv_manip.c |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
index b197568..e2372e5 100644
@@ -1,5 +1,6 @@
 Version 2.02.112 - 
 =====================================
+  Inform about temporarily created volumes only in verbose mode.
   Better support for --test mode with pool creation.
   Query lock holding LV when replacing and converting raid volumes.
   Add extra validate for locked lv within validate_lv_cache_create().
lib/metadata/lv_manip.c +4 -1
index f60b964..6caa284 100644
@@ -7217,7 +7217,10 @@ struct logical_volume *lv_create_single(struct volume_group *vg,
 		return_NULL;
 
 out:
-	log_print_unless_silent("Logical volume \"%s\" created", lv->name);
+	if (lp->temporary)
+		log_verbose("Temporary logical volume \"%s\" created.", lv->name);
+	else
+		log_print_unless_silent("Logical volume \"%s\" created.", lv->name);
 
 	return lv;
 }