mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
dev-cache: dev_cache_index_devs fn is available unconditionally
The new dev_cache_index_devs fn was under ifdef UDEV_SYNC_SUPPORT by mistake, move it out of this ifdef.
This commit is contained in:
parent
52e0d0db44
commit
8b258a005b
@ -777,6 +777,24 @@ static int _insert_file(const char *path)
|
|||||||
return 1;
|
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
|
#ifdef UDEV_SYNC_SUPPORT
|
||||||
|
|
||||||
static int _device_in_udev_db(const dev_t d)
|
static int _device_in_udev_db(const dev_t d)
|
||||||
@ -854,24 +872,6 @@ bad:
|
|||||||
return 0;
|
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)
|
static void _insert_dirs(struct dm_list *dirs)
|
||||||
{
|
{
|
||||||
struct dir_list *dl;
|
struct dir_list *dl;
|
||||||
|
Loading…
Reference in New Issue
Block a user