Don't SIGABORT if device-mapper doesn't generate uevent for DeleteDevice
It looks like in some rare scenarios device-mapper won't create an uevent while handling DM_DEV_REMOVE ioctl. Since failure to generate uevent will result in ueventd not cleaning up /dev paths in user space, it should be ok to just fail DeleteDevice call without aborting the entire process. Test: presubmit Bug: 171266986 Change-Id: Iece28e6e02c35ac4bf33b9be74dfe1bbbb466bd4
This commit is contained in:
parent
f7c47f81ba
commit
3b39a9ef6a
|
@ -111,8 +111,10 @@ bool DeviceMapper::DeleteDevice(const std::string& name,
|
|||
|
||||
// Check to make sure appropriate uevent is generated so ueventd will
|
||||
// do the right thing and remove the corresponding device node and symlinks.
|
||||
CHECK(io.flags & DM_UEVENT_GENERATED_FLAG)
|
||||
<< "Didn't generate uevent for [" << name << "] removal";
|
||||
if ((io.flags & DM_UEVENT_GENERATED_FLAG) == 0) {
|
||||
LOG(ERROR) << "Didn't generate uevent for [" << name << "] removal";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (timeout_ms <= std::chrono::milliseconds::zero()) {
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue