All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vgreduce: only process specified vg when pv is identified by tag
@ 2013-01-23 16:53 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2013-01-23 16:53 UTC (permalink / raw)
  To: lvm-devel

Fix vgreduce to only process specified vg when pv is identified by tag.
process_each_pv was attempting to process all vgs in this case.

---
 WHATS_NEW       | 1 +
 tools/toollib.c | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/WHATS_NEW b/WHATS_NEW
index eb8a4a0..53df906 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.99 - 
 ===================================
+  Fix vgreduce to only process specified vg when pv is identified by tag.
   Fix blkdeactivate to handle nested mountpoints and mangled mount paths.
   Set locales with LC_ALL instead of lower priority LANG variable.
   Fix a crash-inducing race condition in lvmetad.
diff --git a/tools/toollib.c b/tools/toollib.c
index 669d772..0e6979a 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -801,7 +801,14 @@ int process_each_pv(struct cmd_context *cmd, int argc, char **argv,
 			if (sigint_caught())
 				goto out;
 		}
-		if (!dm_list_empty(&tags) && (vgnames = get_vgnames(cmd, 1)) &&
+		if (!dm_list_empty(&tags) && vg) {
+			ret = process_each_pv_in_vg(cmd, vg, &tags, handle,
+						    process_single_pv);
+			if (ret > ret_max)
+				ret_max = ret;
+			if (sigint_caught())
+				goto out;
+		} else if (!dm_list_empty(&tags) && (vgnames = get_vgnames(cmd, 1)) &&
 			   !dm_list_empty(vgnames)) {
 			dm_list_iterate_items(sll, vgnames) {
 				vg = vg_read(cmd, sll->str, NULL, flags);
-- 
1.8.1.rc1.5.g7e0651a



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

only message in thread, other threads:[~2013-01-23 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-23 16:53 [PATCH] vgreduce: only process specified vg when pv is identified by tag David Teigland

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.