summaryrefslogtreecommitdiff
path: root/rules/64-btrfs.rules
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-09-16 23:31:11 +0200
committerKay Sievers <kay@vrfy.org>2012-09-17 13:54:03 +0200
commit0bb91b50100e4633a0e68135854e606653055748 (patch)
treee191e53beb135e2f91e85857ed828776b241a1c9 /rules/64-btrfs.rules
parentf6c2e28b07a0d24c68f7780fc986ac3619fdcbdb (diff)
udev: add btrfs support
All "btrfs" file systems will be registered with the kernel when they show up. Incomplete multi-device volumes will set SYSTEMD_READY=0, to prevent access until the volume is complete and fully registered.
Diffstat (limited to 'rules/64-btrfs.rules')
-rw-r--r--rules/64-btrfs.rules13
1 files changed, 13 insertions, 0 deletions
diff --git a/rules/64-btrfs.rules b/rules/64-btrfs.rules
new file mode 100644
index 000000000..fe0100131
--- /dev/null
+++ b/rules/64-btrfs.rules
@@ -0,0 +1,13 @@
+# 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"
+
+LABEL="btrfs_end"