mirror of
https://github.com/systemd/systemd.git
synced 2024-11-08 02:57:16 +03:00
0e8856d25a
assemble multidevice btrfs volumes without external tools This self-contained approach introduce very little overhead, unless someone has a large number of devices composing many btrfs volumes, in which case btrfs device scan would be faster. Still, having robust implementation is a nice to have alternative for btrfs-progs.
17 lines
582 B
Plaintext
17 lines
582 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"
|
|
|
|
# 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+="@rootlibexecdir@/udevadm trigger -s block -p ID_BTRFS_READY=0"
|
|
|
|
LABEL="btrfs_end"
|