Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e8025aa67a05af04…
Commit: e8025aa67a05af046878f52dfb45fca30ed70084
Parent: c089029b70d64e4f7d2851336d463ce40f1b7023
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Dec 13 11:15:37 2012 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Dec 13 11:19:11 2012 +0100
lvconvert: also allow --type with --stripes
We can also use this for conversion between different mirror segment
types. Each new segment type converter then needs to check itself
whether the --stripes is applicable.
---
tools/lvconvert.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 9c947d7..fa3b1ec 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -169,9 +169,9 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
if ((arg_count(cmd, stripes_long_ARG) || arg_count(cmd, stripesize_ARG)) &&
!(arg_count(cmd, mirrors_ARG) || arg_count(cmd, repair_ARG) ||
- arg_count(cmd, thinpool_ARG))) {
+ arg_count(cmd, thinpool_ARG) || arg_count(cmd, type_ARG))) {
log_error("--stripes or --stripesize argument is only valid "
- "with --mirrors, --repair or --thinpool");
+ "with --mirrors, --repair, --thinpool or --type");
return 0;
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b19f840af82cf176…
Commit: b19f840af82cf176a26c8bddc2217fe862087794
Parent: e5709a32be746ad0d21b13df18f23387bcccabef
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Wed Dec 12 14:39:52 2012 +0100
Committer: Petr Rockai <prockai(a)redhat.com>
CommitterDate: Wed Dec 12 14:44:03 2012 +0100
toollib: Avoid a global lock in process_each_pv if lvmetad is used.
The motivation to grab the global lock is to avoid a scan and metadata parsing
for each PV, but the cost of obtaining metadata is _mostly_ mitigated by having
lvmetad around. Not taking the global lock improves throughput when multiple pvs
or related commands are running in parallel, like in RHEV.
---
tools/toollib.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/toollib.c b/tools/toollib.c
index 817580f..1d67e5d 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -701,7 +701,7 @@ int process_each_pv(struct cmd_context *cmd, int argc, char **argv,
int opt = 0;
int ret_max = ECMD_PROCESSED;
int ret = 0;
- int lock_global = !(flags & READ_WITHOUT_LOCK) && !(flags & READ_FOR_UPDATE);
+ int lock_global = !(flags & READ_WITHOUT_LOCK) && !(flags & READ_FOR_UPDATE) && !lvmetad_active();
struct pv_list *pvl;
struct physical_volume *pv;