xfs: refactor INUMBERS to use iwalk functions

Now that we have generic functions to walk inode records, refactor the
INUMBERS implementation to use it.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
这个提交包含在:
Darrick J. Wong
2019-07-02 09:39:43 -07:00
父节点 04b8fba2e1
当前提交 677717fbd4
修改 5 个文件,包含 93 行新增150 行删除

查看文件

@@ -43,25 +43,9 @@ typedef int (*bulkstat_one_fmt_pf)(struct xfs_ibulk *breq,
int xfs_bulkstat_one(struct xfs_ibulk *breq, bulkstat_one_fmt_pf formatter);
int xfs_bulkstat(struct xfs_ibulk *breq, bulkstat_one_fmt_pf formatter);
typedef int (*inumbers_fmt_pf)(
void __user *ubuffer, /* buffer to write to */
const xfs_inogrp_t *buffer, /* buffer to read from */
long count, /* # of elements to read */
long *written); /* # of bytes written */
typedef int (*inumbers_fmt_pf)(struct xfs_ibulk *breq,
const struct xfs_inogrp *igrp);
int
xfs_inumbers_fmt(
void __user *ubuffer, /* buffer to write to */
const xfs_inogrp_t *buffer, /* buffer to read from */
long count, /* # of elements to read */
long *written); /* # of bytes written */
int /* error status */
xfs_inumbers(
xfs_mount_t *mp, /* mount point for filesystem */
xfs_ino_t *last, /* last inode returned */
int *count, /* size of buffer/count returned */
void __user *buffer, /* buffer with inode info */
inumbers_fmt_pf formatter);
int xfs_inumbers(struct xfs_ibulk *breq, inumbers_fmt_pf formatter);
#endif /* __XFS_ITABLE_H__ */