]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: wire up new v5 bulkstat ioctls
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 28 Aug 2019 16:08:09 +0000 (12:08 -0400)
committerEric Sandeen <sandeen@redhat.com>
Wed, 28 Aug 2019 16:08:09 +0000 (12:08 -0400)
Source kernel commit: 0448b6f488fa66e353a9e00022441cd4aca7f2cf

Wire up the new v5 BULKSTAT ioctl.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_fs.h

index 6bc8adf5c3b9b0bdce1874e6a9c6039fa0a5d9c8..c06c0602a0eed355b58a6236c541be6904227f26 100644 (file)
@@ -456,7 +456,6 @@ struct xfs_fsop_bulkreq {
        __s32           __user *ocount; /* output count pointer         */
 };
 
-
 /*
  * Structures returned from xfs_inumbers routine (XFS_IOC_FSINUMBERS).
  */
@@ -478,6 +477,28 @@ struct xfs_inumbers {
 #define XFS_INUMBERS_VERSION_V1        (1)
 #define XFS_INUMBERS_VERSION_V5        (5)
 
+/* Header for bulk inode requests. */
+struct xfs_bulk_ireq {
+       uint64_t        ino;            /* I/O: start with this inode   */
+       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                 */
+       uint64_t        reserved[5];    /* must be zero                 */
+};
+
+#define XFS_BULK_IREQ_FLAGS_ALL        (0)
+
+/*
+ * ioctl structures for v5 bulkstat and inumbers requests
+ */
+struct xfs_bulkstat_req {
+       struct xfs_bulk_ireq    hdr;
+       struct xfs_bulkstat     bulkstat[];
+};
+#define XFS_BULKSTAT_REQ_SIZE(nr)      (sizeof(struct xfs_bulkstat_req) + \
+                                        (nr) * sizeof(struct xfs_bulkstat))
+
 /*
  * Error injection.
  */
@@ -780,6 +801,7 @@ struct xfs_scrub_metadata {
 /* For compatibility, for now */
 /* #define XFS_IOC_FSGEOMETRY       _IOR ('X', 126, struct xfs_fsop_geom_v5) */
 #define XFS_IOC_FSGEOMETRY XFS_IOC_FSGEOMETRY_V4
+#define XFS_IOC_BULKSTAT            _IOR ('X', 127, struct xfs_bulkstat_req)
 
 /*     XFS_IOC_GETFSUUID ---------- deprecated 140      */