2013-04-11 18:44:03 +04:00
|
|
|
# register bcache devices as they come up
|
|
|
|
# man 7 udev for syntax
|
2010-10-08 18:04:49 +04:00
|
|
|
|
2013-06-08 05:00:57 +04:00
|
|
|
SUBSYSTEM!="block", GOTO="bcache_end"
|
|
|
|
ACTION=="remove", GOTO="bcache_end"
|
|
|
|
|
|
|
|
# Backing devices: scan, symlink, register
|
|
|
|
IMPORT{program}="/sbin/probe-bcache -o udev $tempnode"
|
2010-10-08 18:04:49 +04:00
|
|
|
ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
|
2013-04-11 18:44:03 +04:00
|
|
|
SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="bcache", \
|
|
|
|
RUN+="bcache-register $tempnode"
|
|
|
|
|
2013-06-08 05:00:57 +04:00
|
|
|
# Cached devices: symlink
|
|
|
|
DRIVER=="bcache", ENV{CACHED_UUID}=="?*", \
|
|
|
|
SYMLINK+="bcache/by-uuid/$env{CACHED_UUID}"
|
2013-06-09 03:12:40 +04:00
|
|
|
DRIVER=="bcache", ENV{CACHED_LABEL}=="?*", \
|
|
|
|
SYMLINK+="bcache/by-label/$env{CACHED_LABEL}"
|
2013-06-08 05:00:57 +04:00
|
|
|
|
|
|
|
LABEL="bcache_end"
|
|
|
|
|