Bug 110111
Summary: | btrfs fi usage reports bogus 16EiB free space | ||
---|---|---|---|
Product: | File System | Reporter: | Chris Murphy (bugzilla) |
Component: | btrfs | Assignee: | Josef Bacik (josef) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | dsterba |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.4.0-0.rc6.git0.1.fc24.x86_64 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Chris Murphy
2015-12-29 00:04:43 UTC
Regression testing. With a new mkfs, and mounting the new empty fs, I get this: [root@f23m ~]# btrfs fi usage /mnt/king WARNING: MIXED blockgroups not handled Overall: Device size: 14.91GiB Device allocated: 20.00MiB Device unallocated: 14.89GiB Device missing: 0.00B Used: 60.00KiB Free (estimated): 14.90GiB (min: 14.90GiB) Data ratio: 1.00 Metadata ratio: 1.00 Global reserve: 4.00MiB (used: 0.00B) Data+Metadata,single: Size:8.00MiB, Used:28.00KiB /dev/sdd 8.00MiB System,single: Size:4.00MiB, Used:4.00KiB /dev/sdd 4.00MiB Unallocated: /dev/sdd 14.90GiB And then after copying ~837MiB file, the problem still doesn't happen. [root@f23m ~]# btrfs fi usage /mnt/king/ WARNING: MIXED blockgroups not handled Overall: Device size: 14.91GiB Device allocated: 2.02GiB Device unallocated: 12.89GiB Device missing: 0.00B Used: 1.64GiB Free (estimated): 13.08GiB (min: 13.08GiB) Data ratio: 1.00 Metadata ratio: 1.00 Global reserve: 20.00MiB (used: 0.00B) Data+Metadata,single: Size:1.01GiB, Used:837.86MiB /dev/sdd 1.01GiB System,single: Size:4.00MiB, Used:4.00KiB /dev/sdd 4.00MiB Unallocated: /dev/sdd 13.90GiB However, the Used amount is off by a factor of 2x. [root@f23m king]# btrfs fi df /mnt/king/ System, single: total=4.00MiB, used=4.00KiB Data+Metadata, single: total=1.01GiB, used=837.86MiB GlobalReserve, single: total=20.00MiB, used=0.00B Around 48% used (per conventional df, which matches up reasonably well with btrfs fi df), "fi usage" flips from a sane looking (but still wrong) value to 16.00EiB. This may be due to the lack of support for mixedbg by 'fi usage'. Mixed block groups reporting in 'fi usage' should be fixed in devel, queued for 4.4. |