mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 16:22:41 -04:00
xfs: export realtime group geometry via XFS_FSOP_GEOM
Export the realtime geometry information so that userspace can query it. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -187,7 +187,9 @@ struct xfs_fsop_geom {
|
||||
__u32 logsunit; /* log stripe unit, bytes */
|
||||
uint32_t sick; /* o: unhealthy fs & rt metadata */
|
||||
uint32_t checked; /* o: checked fs & rt metadata */
|
||||
__u64 reserved[17]; /* reserved space */
|
||||
__u32 rgextents; /* rt extents in a realtime group */
|
||||
__u32 rgcount; /* number of realtime groups */
|
||||
__u64 reserved[16]; /* reserved space */
|
||||
};
|
||||
|
||||
#define XFS_FSOP_GEOM_SICK_COUNTERS (1 << 0) /* summary counters */
|
||||
|
||||
@@ -1413,6 +1413,11 @@ xfs_fs_geometry(
|
||||
return;
|
||||
|
||||
geo->version = XFS_FSOP_GEOM_VERSION_V5;
|
||||
|
||||
if (xfs_has_rtgroups(mp)) {
|
||||
geo->rgcount = sbp->sb_rgcount;
|
||||
geo->rgextents = sbp->sb_rgextents;
|
||||
}
|
||||
}
|
||||
|
||||
/* Read a secondary superblock. */
|
||||
|
||||
Reference in New Issue
Block a user