Thread (3 messages) 3 messages, 3 authors, 2021-09-17

Re: strangely large space_info value in dmesg

From: Qu Wenruo <hidden>
Date: 2021-09-16 12:39:00


On 2021/9/16 20:32, Eli V wrote:
I just upgraded one of my btrfs systems from 4.19 kernel to 5.10.46
dmesg is outputing the below messages, I assume because of the
enospc_debug mount option I've had in fstab for quite some time now.
Didn't check all of the numbers, but the first line free value does
seem erroneous, unless that's some sort of theoretical maximum being
displayed. This is a fairly large filesystem at 382TB (btrfs usage
below,) but that's a lot more free then total space:

Thu Sep 16 06:17:55 2021] BTRFS info (device sdb): space_info 4 has
18446743694945091584 free, is not full
This is space info dump, normally meaning you're hitting ENOSPC.

The free value has underflow, we should output it in s64 other than u64.

The free space should be -378764460032.

But if you see no problem, it means we just hit transient ENOSPC during
some operations and can allocate new space for it.

Thus it's really enospc_debug causing some debug output.

Thanks,
Qu
[Thu Sep 16 06:17:55 2021] BTRFS info (device sdb): space_info
total=955742420992, used=468888780800, pinned=2666528768,
reserved=360448000, may_use=862591057920, readonly=65536
[Thu Sep 16 06:17:55 2021] BTRFS info (device sdb): global_block_rsv:
size 536870912 reserved 536870912
[Thu Sep 16 06:17:55 2021] BTRFS info (device sdb): trans_block_rsv:
size 1048576 reserved 1048576
[Thu Sep 16 06:17:55 2021] BTRFS info (device sdb): chunk_block_rsv:
size 0 reserved 0
[Thu Sep 16 06:17:55 2021] BTRFS info (device sdb): delayed_block_rsv:
size 0 reserved 0
[Thu Sep 16 06:17:55 2021] BTRFS info (device sdb): delayed_refs_rsv:
size 862469488640 reserved 862052614144

$ btrfs filesystem usage -T /mirror
Overall:
     Device size:                 382.02TiB
     Device allocated:            380.64TiB
     Device unallocated:            1.38TiB
     Device missing:                  0.00B
     Used:                        338.61TiB
     Free (estimated):             42.52TiB      (min: 41.83TiB)
     Free (statfs, df):            42.52TiB
     Data ratio:                       1.00
     Metadata ratio:                   2.00
     Global reserve:              512.00MiB      (used: 0.00B)
     Multiple profiles:                  no

             Data      Metadata  System
Id Path     single    RAID1     RAID1     Unallocated
-- -------- --------- --------- --------- -----------
  1 /dev/sdb  27.12TiB  59.01GiB         -   105.00GiB
  2 /dev/sdc  27.15TiB  78.00GiB         -    58.00GiB
  3 /dev/sdd  36.12TiB 101.00GiB         -   169.00GiB
  4 /dev/sde  36.18TiB 126.00GiB         -    80.00GiB
  5 /dev/sdf  54.15TiB 188.06GiB  64.00MiB   244.00GiB
  6 /dev/sdg  54.05TiB 293.03GiB   8.00MiB   239.00GiB
  7 /dev/sdh  72.05TiB 486.06GiB 104.00MiB   246.00GiB
  8 /dev/sdi  72.07TiB 449.04GiB  32.00MiB   270.00GiB
-- -------- --------- --------- --------- -----------
    Total    378.90TiB 890.10GiB 104.00MiB     1.38TiB
    Used     337.76TiB 436.91GiB  68.69MiB
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help