[lvm-devel] [PATCH] vgreduce: only process specified vg when pv is identified by tag
David Teigland
teigland at redhat.com
Wed Jan 23 16:53:40 UTC 2013
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
More information about the lvm-devel
mailing list