mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
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.
This commit is contained in:
parent
e5709a32be
commit
b19f840af8
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user