Description of problem: To achieve bcache support in Fedora 20 (See bugs 998543 and 998543) blkid may need to be able to identify bcache superblocks. Currently there is a workaround because bcache-tools provides the probe-bcache utility, but having blkid identify bcache blocks itself may be more appropriate. So I'm not sure if this really needs addressing, but filing a bug anyway. Version-Release number of selected component (if applicable): util-linux-2.23.2-2.fc19.x86_64 How reproducible: 100% Steps to Reproduce: 1. Run blkid on a bcache device e.g. blkid /dev/sdb3 2. Not that blkid does not identify the device Actual results: Not identified Expected results: Identified accurately Additional info: If it is agreed that this needs to be resolved, I'd be more than willing to build a patch that takes care of it.
Added wipefs to the bug title, since it needs changing as well.
No problem to add bcache probing function o libblkid.
OK, I'll build patches for this. Probably next weekend.
(In reply to Rolf Fokkens from comment #3) > OK, I'll build patches for this. Probably next weekend. Please, use try to check more things than only the magic string to make the prober more robust. For example also csum and offset from the cache_sb. Thanks.
Created attachment 792459 [details] Patch to make blkid / wipefs identfy bcache superblocks
As requested the magic string, the csum and the offset are used to identify bcache supperblocks. Reported with upstream bcache: http://thread.gmane.org/gmane.linux.kernel.bcache.devel/2007
Thanks. I had an incomplete wip doing that, with: a #define for BLKID_USAGE_CACHE, a call to blkid_probe_sprintf_version, and a check of the sb->offset field. The set_uuid might also be useful to expose, not sure if there's already a libblkid property name for those.
I have a question -- is there a minimal size of the device required for the bcache? We use blkid_idinfo->minsz to avoid unnecessary seeks+read on too small devices. And.. it would be nice to have a test image (just dd(1)) with bcache superblock. I'd like to add the image to upstream regression test suite. (gzip.. and send me the image by email:-) Thanks!
A backing device is at least 8k, and (assuming 4k pages) so is a cache device. I'm not sure the crc check should be done here, it would be good if wipefs could wipe superblocks with bad crcs.
Sent you the image by mail. Something I noted: apparently the minimum image size is 2MB. When smaller blkid will not identify the image. Is this correct behaviour?
Created attachment 792676 [details] Patch to make blkid / wipefs identfy bcache superblocks (V2) Created a new patch to make blkid / wipefs identfy bcache superblocks. Changes: - actually does check the position specified in the superblock - minsz is now set at 8192
This 'Bug' relates to other Bugs as well because it may obsolete probe-bcache (Bugs 999690, 1003207). Do you think this Bug will be processed in the F20 util-linux package?
(In reply to Rolf Fokkens from comment #12) > Do you think this Bug will be processed in the F20 util-linux package? Yes, I'm going to add bcache support to v2.24 (rc in Sep, final release in Oct -- rc will be in F20).
Merged to the upstream tree. Thanks!
util-linux-2.24-0.1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/util-linux-2.24-0.1.fc20
Package util-linux-2.24-0.1.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing util-linux-2.24-0.1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-17801/util-linux-2.24-0.1.fc20 then log in and leave karma (feedback).
util-linux-2.24-0.1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.