]> git.ipfire.org Git - thirdparty/util-linux.git/commit
zramctl: wait for device being initialized and unlocked by udevd
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 14 Feb 2025 01:32:44 +0000 (10:32 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 19 Feb 2025 15:52:14 +0000 (00:52 +0900)
commit488aac1bdffc06df5b7fb8fe751a6ddb344d0dea
treec5e49e153733d391541e9ad81418f715f8ef3b81
parentd41a8dbe8a87872a4a5344d59583fcf979137271
zramctl: wait for device being initialized and unlocked by udevd

systemd-udevd takes a lock during processing the uevent for a block
device. The kernel refuses 'reset' attribute for zram device is written
when the device node is opened. Hence, during systemd-udevd processes a
uevent for zram device, we cannot write 'reset' attribute.
Let's wait for the device being initialized and unlocked by udevd.

Note, there still exists a race window, as we need to release the lock
before writing 'reset' attribute. But, the situation should be better
now.
configure.ac
meson.build
sys-utils/Makemodule.am
sys-utils/zramctl.c