1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvmetad: need to set up bcache in another place

We need to find one common place to set up bcache
for the lvmetad case, instead of adding calls in
various places.
This commit is contained in:
David Teigland 2018-03-06 15:05:27 -06:00
parent 7e33bd1335
commit e351f8bc66

View File

@ -675,6 +675,13 @@ int label_scan_devs(struct cmd_context *cmd, struct dm_list *devs)
{ {
struct device_list *devl; struct device_list *devl;
/* FIXME: get rid of this, it's only needed for lvmetad in which
case we should be setting up bcache in one place. */
if (!scan_bcache) {
if (!_setup_bcache(0))
return 0;
}
dm_list_iterate_items(devl, devs) { dm_list_iterate_items(devl, devs) {
if (_in_bcache(devl->dev)) { if (_in_bcache(devl->dev)) {
bcache_invalidate_fd(scan_bcache, devl->dev->bcache_fd); bcache_invalidate_fd(scan_bcache, devl->dev->bcache_fd);