Description of problem: I booted F20 after 2 weeks, performed a yum update (a massive one) and then performed a reboot. After booting, the command 'bcache-status' no longer works fully. Version-Release number of selected component (if applicable): Fedora 20 kernel 3.13.3-201.fc20.x86_64 bcache-tools.x86_64 0-0.15.20131018git.fc20 How reproducible: always. Steps to Reproduce: 1. execute 'bcache-status' Actual results: # bcache-status --- bcache --- UUID fce22c0f-653a-45b5-8ec0-d315144ea659 Block Size 512B Bucket Size 512.00KiB Congested? False Read Congestion 2.0ms Write Congestion 20.0ms Total Cache Size 5.72GiB Total Cache Used 5.61GiB (98%) Total Cache Unused 117.19MiB (2%) Traceback (most recent call last): File "/usr/sbin/bcache-status", line 350, in <module> main() File "/usr/sbin/bcache-status", line 343, in main dump_bcache('%s%s' % (SYSFS_BCACHE_PATH, cache), stats, print_subdevices, uuid_map.get(cache, '?')) File "/usr/sbin/bcache-status", line 250, in dump_bcache val = conversion_func(val) File "/usr/sbin/bcache-status", line 217, in <lambda> ('dirty_data', 'Dirty Data', lambda x: fmt_cachesize(interpret_sectors(x))), File "/usr/sbin/bcache-status", line 75, in interpret_sectors if x[-1] in factors: IndexError: string index out of range Expected results: No traceback Additional info: # bcache-super-show /dev/sda7 sb.magic ok sb.first_sector 8 [match] sb.csum 23BAD335D7D1534B [match] sb.version 3 [cache device] dev.label (empty) dev.uuid 57f4aa9d-bf71-4f8e-a14d-5b1b33a86873 dev.sectors_per_block 1 dev.sectors_per_bucket 1024 dev.cache.first_sector 1024 dev.cache.cache_sectors 11999232 dev.cache.total_sectors 12000256 dev.cache.ordered yes dev.cache.discard no dev.cache.pos 0 dev.cache.replacement 0 [lru] cset.uuid fce22c0f-653a-45b5-8ec0-d315144ea659
It's probable related to changes in kernel 3.13-rc6: "Fix dirty_data accounting" (see https://lkml.org/lkml/2013/12/29/95). The concrete result seems to be that /sys/fs/bcache/<UUID>/dirty_data is no longer there, it's still available at the bdev level (/sys/fs/bcache/<UUID>/bdevX/dirty_data. A potential patch is this: --- /usr/sbin/bcache-status 2013-09-09 22:13:18.000000000 +0200 +++ bcache-status 2014-02-18 23:11:57.671975487 +0100 @@ -214,7 +214,6 @@ (None, 'Total Cache Size', lambda x: format_sectors(cache_sectors)), (None, 'Total Cache Used', lambda x: fmt_cachesize(cache_used_sectors)), (None, 'Total Cache Unused', lambda x: fmt_cachesize(cache_unused_sectors)), - ('dirty_data', 'Dirty Data', lambda x: fmt_cachesize(interpret_sectors(x))), ('cache_available_percent', 'Evictable Cache', lambda x: '%s\t(%s%%)' % (format_sectors(float(x) * cache_sectors / 100), x)), (None, 'Replacement Policy', lambda x: replacement_policies.pop() if len(replacement_policies) == 1 else '(Various)'), (None, 'Cache Mode', lambda x: cache_modes.pop() if len(cache_modes) == 1 else '(Various)'), @@ -347,4 +346,4 @@ fd.write('1\n') if __name__ == '__main__': - main() \ No newline at end of file + main() But I need to check upstream.
*** Bug 1067624 has been marked as a duplicate of this bug. ***
bcache-tools-0-0.16.20131018git.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/bcache-tools-0-0.16.20131018git.fc20
Package bcache-tools-0-0.16.20131018git.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 bcache-tools-0-0.16.20131018git.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-2894/bcache-tools-0-0.16.20131018git.fc20 then log in and leave karma (feedback).
For me the patch fixes the problem, thanks :)
After installing the updated bcache-tools from comment #3, the issue seems fixed. # bcache-status --- bcache --- UUID fce22c0f-653a-45b5-8ec0-d315144ea659 Block Size 512 B Bucket Size 512.00 KiB Congested? False Read Congestion 2.0ms Write Congestion 20.0ms Total Cache Size 6 GiB Total Cache Used 5 GiB (96%) Total Cache Unused 234.4 MiB (4%) Evictable Cache 6 GiB (100%) Replacement Policy [lru] fifo random Cache Mode [writethrough] writeback writearound none Total Hits 592 (100%) Total Misses 0 Total Bypass Hits 0 Total Bypass Misses 0 Total Bypassed 0 B The command bcache-status now works ok again. Thanks.
bcache-tools-0-0.16.20131018git.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
*** Bug 1119018 has been marked as a duplicate of this bug. ***