All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix output of pvs -a fof non PV device
@ 2009-04-20 18:30 Milan Broz
  0 siblings, 0 replies; only message in thread
From: Milan Broz @ 2009-04-20 18:30 UTC (permalink / raw)
  To: lvm-devel

Fix pvs -a for segmented output

 # pvs -a -o devices
   Volume group name (null) has invalid characters
   Skipping volume group (null)

...
_pvsegs_sub_single creates fake vg, we need to check
that pv is real here.

Signed-off-by: Milan Broz <mbroz@redhat.com>
---
 tools/toollib.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/toollib.c b/tools/toollib.c
index 3057c90..f9bd154 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -376,7 +376,7 @@ int process_each_segment_in_pv(struct cmd_context *cmd,
 	int ret;
 	struct volume_group *old_vg = vg;
 
-	if (!vg && !is_orphan(pv)) {
+	if (is_pv(pv) && !vg && !is_orphan(pv)) {
 		vg_name = pv_vg_name(pv);
 
 		if (!(vg = vg_lock_and_read(cmd, vg_name, NULL, LCK_VG_READ,




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-20 18:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-20 18:30 [PATCH] fix output of pvs -a fof non PV device Milan Broz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.