Commit 55ef6e7a authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

xfs: hide reserved RT blocks from statfs



File systems with a zoned RT device have a large number of reserved
blocks that are required for garbage collection, and which can't be
filled with user data.  Exclude them from the available blocks reported
through stat(v)fs.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
parent 859b6927
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -869,7 +869,8 @@ xfs_statfs_rt(
{
	st->f_bfree = xfs_rtbxlen_to_blen(mp,
			xfs_sum_freecounter(mp, XC_FREE_RTEXTENTS));
	st->f_blocks = mp->m_sb.sb_rblocks;
	st->f_blocks = mp->m_sb.sb_rblocks - xfs_rtbxlen_to_blen(mp,
			mp->m_free[XC_FREE_RTEXTENTS].res_total);
}

static void