Bug 217045

Summary: btrfs-progs: btrfs device stats -T output is wrong
Product: File System Reporter: Philip May (philip)
Component: btrfsAssignee: BTRFS virtual assignee (fs_btrfs)
Status: RESOLVED CODE_FIX    
Severity: normal CC: dsterba
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 6.1.11-arch1-1 Subsystem:
Regression: No Bisected commit-id:

Description Philip May 2023-02-16 10:17:03 UTC
# btrfs --version
btrfs-progs v6.1.3

The output of
btrfs device stats /srv/btrfs-data
and
btrfs device stats -T /srv/btrfs-data
should contain the same information but it does not.

See below:

# btrfs device stats /srv/btrfs-data
[/dev/sdc1].write_io_errs    0
[/dev/sdc1].read_io_errs     0
[/dev/sdc1].flush_io_errs    0
[/dev/sdc1].corruption_errs  0
[/dev/sdc1].generation_errs  0
[/dev/sdb1].write_io_errs    7489899
[/dev/sdb1].read_io_errs     3751023
[/dev/sdb1].flush_io_errs    117
[/dev/sdb1].corruption_errs  68
[/dev/sdb1].generation_errs  25

# btrfs device stats -T /srv/btrfs-data
Id Path      Write errors Read errors Flush errors Corruption errors Generation errors
-- --------- ------------ ----------- ------------ ----------------- -----------------
 1 /dev/sdc1            0           0            0                 0                 0
 2 /dev/sdb1           25          25           25                25                25
Comment 1 David Sterba 2023-03-02 18:43:46 UTC
Bugs in btrfs-progs are tracked at the github repo, I've created a clone there (https://github.com/kdave/btrfs-progs/issues/585), feel free to continue there if you have a github account or here if not.
Comment 2 David Sterba 2023-03-07 20:19:58 UTC
Will be fixed in 6.2.2.