~ubuntu-branches/ubuntu/vivid/lvm2/vivid

« back to all changes in this revision

Viewing changes to tools/vgscan.c

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2012-05-01 20:27:50 UTC
  • mto: (3.1.23 sid)
  • mto: This revision was merged to the branch mainline in revision 72.
  • Revision ID: package-import@ubuntu.com-20120501202750-gljjjtblowwq9mw8
Tags: upstream-2.02.95
ImportĀ upstreamĀ versionĀ 2.02.95

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
        check_current_backup(vg);
27
27
 
 
28
        /* keep lvmetad up to date */
 
29
        if (!lvmetad_vg_update(vg))
 
30
                stack;
 
31
 
28
32
        return ECMD_PROCESSED;
29
33
}
30
34
 
31
35
int vgscan(struct cmd_context *cmd, int argc, char **argv)
32
36
{
33
 
        int maxret, ret;
 
37
        int maxret, ret, lvmetad;
34
38
 
35
39
        if (argc) {
36
40
                log_error("Too many parameters on command line");
44
48
 
45
49
        persistent_filter_wipe(cmd->filter);
46
50
        lvmcache_destroy(cmd, 1);
 
51
        lvmetad = lvmetad_active();
 
52
        lvmetad_set_active(0); /* do not rely on lvmetad info */
47
53
 
48
54
        log_print("Reading all physical volumes.  This may take a while...");
49
55
 
56
62
                        maxret = ret;
57
63
        }
58
64
 
 
65
        lvmetad_set_active(lvmetad); /* restore */
59
66
        unlock_vg(cmd, VG_GLOBAL);
60
67
        return maxret;
61
68
}