Bug 1119018 - bcache-status fails with writearound cache
Summary: bcache-status fails with writearound cache
Keywords:
Status: CLOSED DUPLICATE of bug 1066555
Alias: None
Product: Fedora
Classification: Fedora
Component: bcache-tools
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rolf Fokkens
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-13 06:51 UTC by Ralf-Peter Rohbeck
Modified: 2014-07-13 07:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-13 07:01:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1066555 0 unspecified CLOSED command 'bcache-status' gives a traceback (IndexError: string index out of range) 2021-02-22 00:41:40 UTC

Description Ralf-Peter Rohbeck 2014-07-13 06:51:02 UTC
Description of problem:
--- bcache ---
Device                      /dev/bcache0 (253:0)
UUID                        29f194ce-a39e-44ec-a650-f9f20b5d2ac7
Block Size                  0.50KiB
Bucket Size                 512.00KiB
Congested?                  False
Read Congestion             2.0ms
Write Congestion            20.0ms
Total Cache Size            476.94GiB
Total Cache Used            476.94GiB   (100%)
Total Cache Unused          0B  (0%)
Traceback (most recent call last):
  File "bcache-stabcache-status-20130825/bcache-status", line 348, in <module>
    main()
  File "bcache-stabcache-status-20130825/bcache-status", line 341, in main
    dump_bcache('%s%s' % (SYSFS_BCACHE_PATH, cache), stats, print_subdevices, uuid_map.get(cache, '?'))
  File "bcache-stabcache-status-20130825/bcache-status", line 242, in dump_bcache
    val = conversion_func(val)
  File "bcache-stabcache-status-20130825/bcache-status", line 209, in <lambda>
    ('dirty_data',                   'Dirty Data',         lambda x: fmt_cachesize(interpret_sectors(x))),
  File "bcache-stabcache-status-20130825/bcache-status", line 75, in interpret_sectors
    if x[-1] in factors:
IndexError: string index out of range

Version-Release number of selected component (if applicable):


How reproducible: 100% with writearound (on Debian though)


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Quick patch:
$ diff bcache-status bcache-status.RPR
74a75,76
>     if len(x) == 0:
>         return 0

Comment 1 Ralf-Peter Rohbeck 2014-07-13 07:01:43 UTC
Nevermind, I had an older version. The newer version doesn't look at the dirty_data entry any more.

*** This bug has been marked as a duplicate of bug 1066555 ***


Note You need to log in before you can comment on or make changes to this bug.