• Darrick J. Wong's avatar
    xfs: don't report reserved bnobt space as available · 85bcfa26
    Darrick J. Wong authored
    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.
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
    Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
    85bcfa26
xfs_super.c 58.1 KB