xfs: define a version field for the AG geometry ioctl structure
PATCH 1/1 xfs: define a version field for the AG geometry ioctl structure
From: Darrick J. Wong <[email protected]>
Define a version field for the AG geometry ioctl structure.
Signed-off-by Darrick J. Wong <[email protected]>
--- fs/xfs/libxfs/xfs_ag.c | 1 + fs/xfs/libxfs/xfs_fs.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-)
fs/xfs/libxfs/xfs_ag.c +1 -0
@@ -566,6 +566,7 @@ xfs_ag_get_geometry(/* Fill out form. */ memset (ageo,0 ,sizeof (*ageo)); ageo->ag_number = agno; + ageo->ag_version =XFS_AG_GEOM_VERSION_V0 ; agi =XFS_BUF_TO_AGI (agi_bp); ageo->ag_icount =be32_to_cpu (agi->agi_count);
fs/xfs/libxfs/xfs_fs.h +3 -1
@@ -287,7 +287,7 @@ struct xfs_ag_geometry {uint32_t ag_ifree;/* o: inodes free */ uint32_t ag_sick;/* o: sick things in ag */ uint32_t ag_checked;/* o: checked metadata in ag */ -uint32_t ag_reserved32;/* o: zero */ +uint32_t ag_version;/* o: version of this structure */ uint64_t ag_reserved[12 ];/* o: zero */ };#define XFS_AG_GEOM_SICK_SB (1 << 0)/* superblock */
@@ -301,6 +301,8 @@ struct xfs_ag_geometry {#define XFS_AG_GEOM_SICK_RMAPBT (1 << 8)/* reverse mappings */ #define XFS_AG_GEOM_SICK_REFCNTBT (1 << 9)/* reference counts */ +#define XFS_AG_GEOM_VERSION_V0 (0) +/* * Structures for XFS_IOC_FSGROWFSDATA, XFS_IOC_FSGROWFSLOG & XFS_IOC_FSGROWFSRT */