mirror of
https://github.com/systemd/systemd.git
synced 2024-10-31 07:51:21 +03:00
f8adf25d65
If any devices are marked with 'SYSTEMD_READY=0' then we shouldn't run any btrfs check on them. Indeed there's no point in running "btrfs ready" on devices that already have SYSTEMD_READY=0 set. Most probably such devices are members of a higher layer aggregate device such as dm-multipath or software RAID. Doing IO on them wastes time at best, and may cause delays, timeouts, or even hangs at worst (think active-passive multipath or degraded RAID, for example). It was initially reported at: https://bugzilla.opensuse.org/show_bug.cgi?id=872929
18 lines
620 B
Plaintext
18 lines
620 B
Plaintext
# do not edit this file, it will be overwritten on update
|
|
|
|
SUBSYSTEM!="block", GOTO="btrfs_end"
|
|
ACTION=="remove", GOTO="btrfs_end"
|
|
ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_end"
|
|
ENV{SYSTEMD_READY}=="0", GOTO="btrfs_end"
|
|
|
|
# let the kernel know about this btrfs filesystem, and check if it is complete
|
|
IMPORT{builtin}="btrfs ready $devnode"
|
|
|
|
# mark the device as not ready to be used by the system
|
|
ENV{ID_BTRFS_READY}=="0", ENV{SYSTEMD_READY}="0"
|
|
|
|
# reconsider pending devices in case when multidevice volume awaits
|
|
ENV{ID_BTRFS_READY}=="1", RUN+="@rootbindir@/udevadm trigger -s block -p ID_BTRFS_READY=0"
|
|
|
|
LABEL="btrfs_end"
|