1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +03:00

Merge pull request #15930 from poettering/udev-no-lock-warn

udev: when the BSD lock on a block device is taken, don't complain
This commit is contained in:
Yu Watanabe 2020-05-29 10:39:14 +09:00 committed by GitHub
commit 63ef9d31fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -443,13 +443,18 @@ static int worker_device_monitor_handler(sd_device_monitor *monitor, sd_device *
assert(manager); assert(manager);
r = worker_process_device(manager, dev); r = worker_process_device(manager, dev);
if (r < 0) if (r == -EAGAIN)
log_device_warning_errno(dev, r, "Failed to process device, ignoring: %m"); /* if we couldn't acquire the flock(), then proceed quietly */
log_device_debug_errno(dev, r, "Device currently locked, not processing.");
else {
if (r < 0)
log_device_warning_errno(dev, r, "Failed to process device, ignoring: %m");
/* send processed event back to libudev listeners */ /* send processed event back to libudev listeners */
r = device_monitor_send_device(monitor, NULL, dev); r = device_monitor_send_device(monitor, NULL, dev);
if (r < 0) if (r < 0)
log_device_warning_errno(dev, r, "Failed to send device, ignoring: %m"); log_device_warning_errno(dev, r, "Failed to send device, ignoring: %m");
}
/* send udevd the result of the event execution */ /* send udevd the result of the event execution */
r = worker_send_message(manager->worker_watch[WRITE_END]); r = worker_send_message(manager->worker_watch[WRITE_END]);