On Sun, Mar 27, 2022 at 09:58:50AM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > On a modern filesystem, we don't allow userspace to allocate blocks for > data storage from the per-AG space reservations, the user-controlled > reservation pool that prevents ENOSPC in the middle of internal > operations, or the internal per-AG set-aside that prevents unwanted > filesystem shutdowns due to ENOSPC during a bmap btree split. > > Since we now consider freespace btree blocks as unavailable for > allocation for data storage, we shouldn't report those blocks via statfs > either. This makes the numbers that we return via the statfs f_bavail > and f_bfree fields a more conservative estimate of actual free space. Looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>