]> sourceware.org Git - lvm2.git/commitdiff
toollib: remove unneeded call in process_each_pv
authorDavid Teigland <teigland@redhat.com>
Thu, 7 Apr 2016 18:45:26 +0000 (13:45 -0500)
committerDavid Teigland <teigland@redhat.com>
Tue, 19 Apr 2016 14:40:24 +0000 (09:40 -0500)
process_each_pv was doing:

1. lvmcache_seed_infos_from_lvmetad()
   sends pv_list request to lvmetad.

2. get_vgnameids()
   sends vg_list request to lvmetad.

3. _get_all_devices()
   first calls lvmcache_seed_infos_from_lvmetad(),
   which is a no-op if it's already been called.

Because get_vgnameids() does not use the information
from lvmcache_seed_infos_from_lvmetad(), it does not
need to be called prior to get_all_devices where
it is actually needed.

tools/toollib.c

index b9db9cb31fdd04e4b37f9a0355d5f492f6e80456..ac2a57a4865760098e33c3e34c904215f655af9d 100644 (file)
@@ -3372,12 +3372,6 @@ int process_each_pv(struct cmd_context *cmd,
                dev_cache_full_scan(cmd->full_filter);
        }
 
-       /*
-        * Need pvid's set on all PVs before processing so that pvid's
-        * can be compared to find duplicates while processing.
-        */
-       lvmcache_seed_infos_from_lvmetad(cmd);
-
        if (!get_vgnameids(cmd, &all_vgnameids, only_this_vgname, 1)) {
                stack;
                return ret;
This page took 0.062678 seconds and 5 git commands to generate.