mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
scan: handle request to scan missing dev
This commit is contained in:
parent
89f54a5094
commit
e4f478d86d
@ -257,6 +257,8 @@ struct bcache *scan_bcache;
|
||||
|
||||
static bool _in_bcache(struct device *dev)
|
||||
{
|
||||
if (!dev)
|
||||
return NULL;
|
||||
return (dev->flags & DEV_IN_BCACHE) ? true : false;
|
||||
}
|
||||
|
||||
@ -402,6 +404,9 @@ static int _scan_dev_open(struct device *dev)
|
||||
int flags = 0;
|
||||
int fd;
|
||||
|
||||
if (!dev)
|
||||
return 0;
|
||||
|
||||
if (dev->flags & DEV_IN_BCACHE) {
|
||||
log_error("scan_dev_open %s DEV_IN_BCACHE already set", dev_name(dev));
|
||||
dev->flags &= ~DEV_IN_BCACHE;
|
||||
|
Loading…
Reference in New Issue
Block a user