]> sourceware.org Git - lvm2.git/commitdiff
If lvmetad fails, don't set _has_scanned
authorAlasdair Kergon <agk@redhat.com>
Tue, 28 Feb 2012 18:20:17 +0000 (18:20 +0000)
committerAlasdair Kergon <agk@redhat.com>
Tue, 28 Feb 2012 18:20:17 +0000 (18:20 +0000)
lib/cache/lvmcache.c

index 8d03968803fdf4638df3fc958a382e8d66ce50a9..390328dd9440813d71c0ee75578984e6cf1d24bd 100644 (file)
@@ -116,10 +116,15 @@ int lvmcache_init(void)
 
 void lvmcache_seed_infos_from_lvmetad(struct cmd_context *cmd)
 {
-       if (lvmetad_active() && !_has_scanned) {
-               lvmetad_pv_list_to_lvmcache(cmd);
-               _has_scanned = 1;
+       if (!lvmetad_active() || _has_scanned)
+               return;
+
+       if (!lvmetad_pv_list_to_lvmcache(cmd)) {
+               stack;
+               return;
        }
+
+       _has_scanned = 1;
 };
 
 
This page took 0.0325 seconds and 5 git commands to generate.