From 9c72fc1d2bf7db73442fe9c34fb626d3fa95bad5 Mon Sep 17 00:00:00 2001 From: Dave Wysochanski Date: Thu, 16 Jul 2009 03:25:26 +0000 Subject: [PATCH] Remove extraneous messages for extent_size and alloc_policy upon vgcreate. When converting to the new liblvm functions, the vgcreate code path changed to create a new vg, then set values. As a result of this change, and the fact that we give a user a message if they try to set the same value of a VG attribute (extent_size, alloc_policy, etc), you'll see these 2 extraneous "is already" messages with vgcreate: tools/lvm vgcreate vg2 /dev/loop2 Physical extent size of VG vg2 is already 4.00 MB Volume group allocation policy is already normal Volume group "vg2" successfully created Signed-off-by: Dave Wysochanski Author: Dave Wysochanski --- WHATS_NEW | 1 + lib/metadata/metadata.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index e3299bf0a..2c168d1a1 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.50 - ================================ + Remove unnecessary messages after vgcreate/vgsplit refactor (2.02.49). Add log_errno to set a specific errno and replace log_error in due course. Add lvm_errno and lvm_errmsg to liblvm to obtain failure information. Change create_toolcontext to still return an object if it fails part-way. diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index 7f5827740..13bba404d 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -742,7 +742,7 @@ int vg_set_extent_size(vg_t *vg, uint32_t new_size) } if (new_size == vg->extent_size) { - log_error("Physical extent size of VG %s is already %s", + log_verbose("Physical extent size of VG %s is already %s", vg->name, display_size(vg->cmd, (uint64_t) new_size)); return 1; } @@ -933,7 +933,7 @@ int vg_set_alloc_policy(vg_t *vg, alloc_policy_t alloc) } if (alloc == vg->alloc) { - log_print("Volume group allocation policy is already %s", + log_verbose("Volume group allocation policy is already %s", get_alloc_string(vg->alloc)); return 1; } -- 2.43.5