Re: [PATCH] xfs: fix f_bfree underflow in statfs()
From: Christoph Hellwig
Date: Thu Nov 12 2026 - 08:45:21 EST
On Thu, Nov 12, 2026 at 05:20:18AM -0500, Hengyu Liang wrote:
> The issue can be reproduced on a new 2 GiB filesystem mounted on /mnt:
>
> for i in $(seq 3000); do head -c 65536 /dev/zero > /mnt/s$i; done
> dd if=/dev/zero of=/mnt/big bs=1M
> xfs_io -x -c 'resblks 100000000' /mnt
> for i in $(seq 1 2 3000); do rm /mnt/s$i; done
> sync
> df -h /mnt
Can you add this to xfstests?
The fix itself looks good, thanks a lot!
Reviewed-by: Christoph Hellwig <hch@xxxxxx>