summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_itable.h
diff options
context:
space:
mode:
authorJie Liu <jeff.liu@oracle.com>2014-08-04 05:22:31 +0400
committerDave Chinner <david@fromorbit.com>2014-08-04 05:22:31 +0400
commit1e773c4989d2dfe08332b4c18f7e1d7ad633015c (patch)
tree1bbc729141d2aa5be746e34a701668bc272285e7 /fs/xfs/xfs_itable.h
parentf3d1e587437b784635459dcfccaedd17149282cc (diff)
downloadlinux-1e773c4989d2dfe08332b4c18f7e1d7ad633015c.tar.xz
xfs: introduce xfs_bulkstat_ag_ichunk
Introduce xfs_bulkstat_ag_ichunk() to process inodes in chunk with a pointer to a formatter function that will iget the inode and fill in the appropriate structure. Refactor xfs_bulkstat() with it. Signed-off-by: Jie Liu <jeff.liu@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_itable.h')
-rw-r--r--fs/xfs/xfs_itable.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/xfs/xfs_itable.h b/fs/xfs/xfs_itable.h
index 6ea8b3912fa4..aaed08022eb9 100644
--- a/fs/xfs/xfs_itable.h
+++ b/fs/xfs/xfs_itable.h
@@ -30,6 +30,22 @@ typedef int (*bulkstat_one_pf)(struct xfs_mount *mp,
int *ubused,
int *stat);
+struct xfs_bulkstat_agichunk {
+ xfs_ino_t ac_lastino; /* last inode returned */
+ char __user **ac_ubuffer;/* pointer into user's buffer */
+ int ac_ubleft; /* bytes left in user's buffer */
+ int ac_ubelem; /* spaces used in user's buffer */
+};
+
+int
+xfs_bulkstat_ag_ichunk(
+ struct xfs_mount *mp,
+ xfs_agnumber_t agno,
+ struct xfs_inobt_rec_incore *irbp,
+ bulkstat_one_pf formatter,
+ size_t statstruct_size,
+ struct xfs_bulkstat_agichunk *acp);
+
/*
* Values for stat return value.
*/