summaryrefslogtreecommitdiff
path: root/61-bcache.rules
diff options
context:
space:
mode:
authorGabriel <g2p.code@gmail.com>2013-04-11 16:44:03 +0200
committerKent Overstreet <koverstreet@google.com>2013-04-11 17:08:23 -0700
commit944cb4ce32b7c8a090d6ecd36eef1946d85a8048 (patch)
tree6a446827c1aebe9c354717436b737d811f825274 /61-bcache.rules
parent3088f201edfe5cb0ad6117d84146c0b2b84205e8 (diff)
downloadbcache-tools-944cb4ce32b7c8a090d6ecd36eef1946d85a8048.tar.zst
Register devices with just udev.
This means bcache devices will be registered earlier and in all cases, not just when the rootfs fails to mount. The initramfs hook is still there to ensure the bcache module and udev rules are shipped if an initramfs is used.
Diffstat (limited to '61-bcache.rules')
-rw-r--r--61-bcache.rules7
1 files changed, 6 insertions, 1 deletions
diff --git a/61-bcache.rules b/61-bcache.rules
index acedefe..7857914 100644
--- a/61-bcache.rules
+++ b/61-bcache.rules
@@ -1,3 +1,8 @@
-KERNEL=="sd*", ENV{DEVTYPE}=="disk", IMPORT{program}="/sbin/probe-bcache -o udev $tempnode"
+# register bcache devices as they come up
+# man 7 udev for syntax
+SUBSYSTEM=="block", IMPORT{program}="/sbin/probe-bcache -o udev $tempnode"
ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
+SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="bcache", \
+ RUN+="bcache-register $tempnode"
+