From: Darrick J. Wong Date: Wed, 28 Aug 2019 16:08:09 +0000 (-0400) Subject: xfs: specify AG in bulk req X-Git-Tag: v5.3.0-rc1~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cbab59a7fa7f328da517ffc6889684ed2660bdc4;p=thirdparty%2Fxfsprogs-dev.git xfs: specify AG in bulk req Source kernel commit: 13d59a2a61cbbb4cda13a0cba6d4d1fc537f5dd4 Add a new xfs_bulk_ireq flag to constrain the iteration to a single AG. If the passed-in startino value is zero then we start with the first inode in the AG that the user passes in; otherwise, we iterate only within the same AG as the passed-in inode. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Brian Foster Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h index e41a3de7c..c9f7166cf 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -483,11 +483,17 @@ struct xfs_bulk_ireq { uint32_t flags; /* I/O: operation flags */ uint32_t icount; /* I: count of entries in buffer */ uint32_t ocount; /* O: count of entries filled out */ - uint32_t reserved32; /* must be zero */ + uint32_t agno; /* I: see comment for IREQ_AGNO */ uint64_t reserved[5]; /* must be zero */ }; -#define XFS_BULK_IREQ_FLAGS_ALL (0) +/* + * Only return results from the specified @agno. If @ino is zero, start + * with the first inode of @agno. + */ +#define XFS_BULK_IREQ_AGNO (1 << 0) + +#define XFS_BULK_IREQ_FLAGS_ALL (XFS_BULK_IREQ_AGNO) /* * ioctl structures for v5 bulkstat and inumbers requests