xfs: define a flags field for the AG geometry ioctl structure
PATCH 1/1 xfs: define a flags field for the AG geometry ioctl structure
From: Darrick J. Wong <[email protected]>
Define a flags field for the AG geometry ioctl structure.
Signed-off-by Darrick J. Wong <[email protected]>
--- fs/xfs/libxfs/xfs_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_fs.h +1 -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_flags;/* o: flags for this ag */ uint64_t ag_reserved[12 ];/* o: zero */ };#define XFS_AG_GEOM_SICK_SB (1 << 0)/* superblock */
PATCH v2 1/1 xfs: define a flags field for the AG geometry ioctl structure
From: Darrick J. Wong <[email protected]>
Define a flags field for the AG geometry ioctl structure.
Signed-off-by Darrick J. Wong <[email protected]>
---
v2: define ag_flags as an *in* field
--- fs/xfs/libxfs/xfs_fs.h | 2 +- fs/xfs/xfs_ioctl.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
fs/xfs/libxfs/xfs_fs.h +1 -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_flags;/* i: flags for this ag */ uint64_t ag_reserved[12 ];/* o: zero */ };#define XFS_AG_GEOM_SICK_SB (1 << 0)/* superblock */
fs/xfs/xfs_ioctl.c +2 -0
@@ -1038,6 +1038,8 @@ xfs_ioc_ag_geometry(if (copy_from_user (&ageo, arg,sizeof (ageo)))return -EFAULT ; +if (ageo.ag_flags) +return -EINVAL ; error =xfs_ag_get_geometry (mp, ageo.ag_number, &ageo);if (error)