<div dir="ltr">Hi,<br><br>Apologies for including everyone in this message, but I’d like to bring your attention to a fix [1], which may require your input.<br>The issue concerns a potential hang during the boot process when the system is waiting for the encrypted swap device node.<br>This is caused by systemd-makefs skipping block device access locking for device-mapper devices.<br><br>A more detailed explanation and proposed solution are documented here [2].<br><br>In brief, systemd-udevd probes block devices for filesystem superblock and partition table information as they appear.<br>If another process modifies a superblock or partition table concurrently, the probing can be affected.<br>This, in turn, may lead to unintended behavior in programs that rely on udev events.<br><br>To mitigate such issues, systemd-udevd normally acquires a LOCK_SH|LOCK_NB using flock on the main block device before processing.<br>However, commit #e918a1b5a94f (udev: exclude device-mapper from block device ownership event locking) disabled this behavior for device-mapper devices, which appears to be the root cause of the boot hang with encrypted swap.<br><br>The commit appears somewhat ambiguous to me, as my understanding is that device-mapper devices should not be deactivated while a udev rule is being processed.<br>I’ve reached out to the original author for clarification but haven’t received a response yet.<br>I’ve also reviewed related projects such as multipath-tools and lvm2, but couldn’t find similar examples of deactivating devices during udev remove events.<br><br>As I may not be an expert in this specific area, I would greatly appreciate it if you could share your insights on the matter.<br>In particular, <b>could you help confirm whether holding a flock lock on a block device while handling udev events might introduce any regressions?</b><br>If this issue falls outside your scope, please kindly disregard this message—and I apologize for the disturbance.<br><br>Since the bug is related to a boot hang, we are eager to resolve it promptly.<br>Please don’t hesitate to raise any concerns or suggestions.<br><br>Thank you very much for your support.<br><br>Best regards,<br>Chengen Du<br><br>[1] <a href="https://github.com/systemd/systemd/pull/37080">https://github.com/systemd/systemd/pull/37080</a><br>[2] <a href="https://github.com/systemd/systemd/blob/main/docs/BLOCK_DEVICE_LOCKING.md">https://github.com/systemd/systemd/blob/main/docs/BLOCK_DEVICE_LOCKING.md</a></div>