On Fri, Dec 06, 2019 at 03:35:59PM -0700, Chris Murphy wrote: > On Fri, Dec 6, 2019 at 2:26 PM Martin Raiber wrote: > > > > Hi, > > > > with kernel 5.4.1 I have the problem that df shows 100% space used. I > > can still write to the btrfs volume, but my software looks at the > > available space and starts deleting stuff if statfs() says there is a > > low amount of available space. > > This is the second bug like this reported in as many days against 5.4.1. > > Does this happen with an older kernel? Any 5.3 kernel or 5.2.15+ or > any 5.1 kernel? Or heck, even 5.4? :P I've noticed very different (lower) df space estimations while testing 5.3 kernels, compared to 5.0 or 5.2, on a draid5/mraid1 array. df estimated about 1926 GB free on 5.0 and 5.2, 964 GB free on 5.3. I'm guessing about 2GB was used in the time between those measurements, which accounts for the discrepancy 1926 != 964 * 2. My array has 2 large disks and 1 small one. The small one is full, so only 2 drives are available for allocation, and at the time they both had 954 GB of unallocated space + 10 GB in allocated/unused space. The correct amount of free space is closer to 964 GB (5.3 value) than 1926 GB (5.0/5.2 values). > > > > > > # df -h > > Filesystem Size Used Avail > > Use% Mounted on > > ... > > /dev/loop0 7.4T 623G 0 > > 100% /media/backup > > ... > > > > statfs("/media/backup", {f_type=BTRFS_SUPER_MAGIC, f_bsize=4096, > > f_blocks=1985810876, f_bfree=1822074245, f_bavail=0, f_files=0, > > f_ffree=0, f_fsid={val=[3667078581, 2813298474]}, f_namelen=255, > > f_frsize=4096, f_flags=ST_VALID|ST_NOATIME}) = 0 > > > f_bavail=0 seems wrong to me. > > What distro and what version of coreutils? > > It's the same questions for Tomasz in yesterday's thread with similar subject. > > -- > Chris Murphy