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:
parent
7e33bd1335
commit
e351f8bc66
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user