kdave / btrfs-progs

Development of userspace BTRFS tools
GNU General Public License v2.0
550 stars 241 forks source link

'btrfs scrub status /path' prints '(some device limits set)' even when no limits are set #727

Closed manxorist closed 8 months ago

manxorist commented 8 months ago
root@falbala:~# uname -a
Linux falbala 6.5.0-5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.13-1 (2023-11-29) x86_64 GNU/Linux
root@falbala:~# btrfs --version
btrfs-progs v6.6.3
root@falbala:~# btrfs scrub status /data/
UUID:             4b16016c-15d3-4389-ae7f-ed98b1873f51
Scrub started:    Sun Jan  7 10:34:27 2024
Status:           running
Duration:         2:07:29
Time left:        23:13:35
ETA:              Mon Jan  8 11:55:36 2024
Total to scrub:   16.50TiB
Bytes scrubbed:   1.38TiB  (8.38%)
Rate:             189.57MiB/s (some device limits set)
Error summary:    no errors found
root@falbala:~# cat /sys/fs/btrfs/*/devinfo/*/scrub_speed_max
0
0
0
0
0
0
0
0
0
0
0
0
0

On single-device file-systems, it does not print that message.

Looking at the code, https://github.com/kdave/btrfs-progs/blob/v6.6.3/cmds/scrub.c#L386-L392 appears to be simply not matching what the comment (and documentation (https://btrfs.readthedocs.io/en/latest/btrfs-scrub.html#subcommand)) says.

kdave commented 8 months ago

Thanks for the report, fixed in devel.