xfs: always use iget in bulkstat
The non-coherent bulkstat versionsthat look directly at the inode buffers causes various problems with performance optimizations that make increased use of just logging inodes. This patch makes bulkstat always use iget, which should be fast enough for normal use with the radix-tree based inode cache introduced a while ago. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
committed by
Dave Chinner
parent
1817176a86
commit
7dce11dbac
@@ -237,15 +237,13 @@ xfs_bulkstat_one_compat(
|
||||
xfs_ino_t ino, /* inode number to get data for */
|
||||
void __user *buffer, /* buffer to place output in */
|
||||
int ubsize, /* size of buffer */
|
||||
void *private_data, /* my private data */
|
||||
xfs_daddr_t bno, /* starting bno of inode cluster */
|
||||
int *ubused, /* bytes used by me */
|
||||
void *dibuff, /* on-disk inode buffer */
|
||||
int *stat) /* BULKSTAT_RV_... */
|
||||
{
|
||||
return xfs_bulkstat_one_int(mp, ino, buffer, ubsize,
|
||||
xfs_bulkstat_one_fmt_compat, bno,
|
||||
ubused, dibuff, stat);
|
||||
ubused, stat);
|
||||
}
|
||||
|
||||
/* copied from xfs_ioctl.c */
|
||||
@@ -298,13 +296,11 @@ xfs_compat_ioc_bulkstat(
|
||||
int res;
|
||||
|
||||
error = xfs_bulkstat_one_compat(mp, inlast, bulkreq.ubuffer,
|
||||
sizeof(compat_xfs_bstat_t),
|
||||
NULL, 0, NULL, NULL, &res);
|
||||
sizeof(compat_xfs_bstat_t), 0, NULL, &res);
|
||||
} else if (cmd == XFS_IOC_FSBULKSTAT_32) {
|
||||
error = xfs_bulkstat(mp, &inlast, &count,
|
||||
xfs_bulkstat_one_compat, NULL,
|
||||
sizeof(compat_xfs_bstat_t), bulkreq.ubuffer,
|
||||
BULKSTAT_FG_QUICK, &done);
|
||||
xfs_bulkstat_one_compat, sizeof(compat_xfs_bstat_t),
|
||||
bulkreq.ubuffer, &done);
|
||||
} else
|
||||
error = XFS_ERROR(EINVAL);
|
||||
if (error)
|
||||
|
Reference in New Issue
Block a user