mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
filter-usable: filter out blocked and suspended devices firmly when scanning for lvmetad
We can't hang on blocked or suspended devices when the scan is done for lvmetad update - when the device gets unblocked or resumed, there's always CHANGE event generated which will fire the udev rule to run extra pvscan --cache for that device which makes sure that lvmetad is up-to-date.
This commit is contained in:
parent
f3bb1c018f
commit
c87e5a308a
@ -36,8 +36,15 @@ static int _passes_usable_filter(struct dev_filter *f, struct device *dev)
|
||||
break;
|
||||
case FILTER_MODE_PRE_LVMETAD:
|
||||
ucp.check_empty = 1;
|
||||
ucp.check_blocked = 0;
|
||||
ucp.check_suspended = ignore_suspended_devices();
|
||||
/*
|
||||
* If we're scanning for lvmetad update,
|
||||
* we don't want to hang on blocked/suspended devices.
|
||||
* When the device is unblocked/resumed, surely,
|
||||
* there's going to be a CHANGE event so the device
|
||||
* gets scanned via udev rule anyway after resume.
|
||||
*/
|
||||
ucp.check_blocked = 1;
|
||||
ucp.check_suspended = 1;
|
||||
ucp.check_error_target = 1;
|
||||
ucp.check_reserved = 1;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user