]> sourceware.org Git - lvm2.git/commitdiff
dev-cache: dev_cache_index_devs fn is available unconditionally
authorPeter Rajnoha <prajnoha@redhat.com>
Wed, 30 Mar 2016 11:06:12 +0000 (13:06 +0200)
committerPeter Rajnoha <prajnoha@redhat.com>
Wed, 30 Mar 2016 11:06:20 +0000 (13:06 +0200)
The new dev_cache_index_devs fn was under ifdef UDEV_SYNC_SUPPORT by mistake,
move it out of this ifdef.

lib/device/dev-cache.c

index 1729aba3bb5cef341e4f0311711ea156becff620..50ef2f29f488231108ffb69452a04dfe75382cc3 100644 (file)
@@ -777,6 +777,24 @@ static int _insert_file(const char *path)
        return 1;
 }
 
+int dev_cache_index_devs(void)
+{
+       struct btree_iter *iter = btree_first(_cache.devices);
+       struct device *dev;
+       int r = 1;
+
+       while (iter) {
+               dev = btree_get_data(iter);
+
+               if (!_index_dev_by_vgid_and_lvid(dev))
+                       r = 0;
+
+               iter = btree_next(iter);
+       }
+
+       return r;
+}
+
 #ifdef UDEV_SYNC_SUPPORT
 
 static int _device_in_udev_db(const dev_t d)
@@ -854,24 +872,6 @@ bad:
        return 0;
 }
 
-int dev_cache_index_devs(void)
-{
-       struct btree_iter *iter = btree_first(_cache.devices);
-       struct device *dev;
-       int r = 1;
-
-       while (iter) {
-               dev = btree_get_data(iter);
-
-               if (!_index_dev_by_vgid_and_lvid(dev))
-                       r = 0;
-
-               iter = btree_next(iter);
-       }
-
-       return r;
-}
-
 static void _insert_dirs(struct dm_list *dirs)
 {
        struct dir_list *dl;
This page took 0.04202 seconds and 5 git commands to generate.