diff options
author | Gabriel <g2p.code@gmail.com> | 2013-07-21 20:17:17 +0200 |
---|---|---|
committer | Kent Overstreet <kmo@daterainc.com> | 2013-07-21 18:59:18 -0700 |
commit | 0b57e166ae86d525ef42842cabf7692fc7c44039 (patch) | |
tree | 54fec8faa3669ee9174a7dfe6698505328240dba | |
parent | 7721b11a6095b10127621bf78a3b3462bb67e696 (diff) | |
download | bcache-tools-0b57e166ae86d525ef42842cabf7692fc7c44039.tar.gz |
Don't register if a non-bcache superblock is found as well
-rw-r--r-- | 61-bcache.rules | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/61-bcache.rules b/61-bcache.rules index 22c1a90e..dd85e69a 100644 --- a/61-bcache.rules +++ b/61-bcache.rules @@ -5,10 +5,15 @@ SUBSYSTEM!="block", GOTO="bcache_end" ACTION=="remove", GOTO="bcache_end" # Backing devices: scan, symlink, register +IMPORT{program}="/sbin/blkid -o udev $tempnode" +# blkid and probe-bcache can disagree, in which case don't register +ENV{ID_FS_TYPE}=="?*", ENV{ID_FS_TYPE}!="bcache", GOTO="bcache_backing_end" + 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" +LABEL="bcache_backing_end" # Cached devices: symlink DRIVER=="bcache", ENV{CACHED_UUID}=="?*", \ |