Commit 012482b3 authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

xfs: add a rtg_blocks helper



Shortcut dereferencing the xg_block_count field in the generic group
structure.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
parent a581de0d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -270,7 +270,7 @@ xfs_rtgroup_get_geometry(
	/* Fill out form. */
	memset(rgeo, 0, sizeof(*rgeo));
	rgeo->rg_number = rtg_rgno(rtg);
	rgeo->rg_length = rtg_group(rtg)->xg_block_count;
	rgeo->rg_length = rtg_blocks(rtg);
	xfs_rtgroup_geom_health(rtg, rgeo);
	return 0;
}
+5 −0
Original line number Diff line number Diff line
@@ -66,6 +66,11 @@ static inline xfs_rgnumber_t rtg_rgno(const struct xfs_rtgroup *rtg)
	return rtg->rtg_group.xg_gno;
}

static inline xfs_rgblock_t rtg_blocks(const struct xfs_rtgroup *rtg)
{
	return rtg->rtg_group.xg_block_count;
}

static inline struct xfs_inode *rtg_bitmap(const struct xfs_rtgroup *rtg)
{
	return rtg->rtg_inodes[XFS_RTGI_BITMAP];