bcache-tools: only call to_cache_sb() for bcache device in may_add_item()

to_cache_sb() will print an error message "Unsupported super block
version" if the super block version is invalid. For non-bcache devices,
it is unnecessary to check version number and print bogus error messages.

This patch checks bcache_magic earlier in may_add_item(), and only calls
to_cache_sb() if the magic string matched. Then the non-bcache devices
can be skipped, and no more bogus error message observed.

Signed-off-by: Coly Li <colyli@suse.de>
1 file changed