In get_agino_buf, grab inode buffers using the same size as the inode
processing code. Since the inode processing code uses that same
buffer size, this means that get_agino_buf can serve requests from the
cache instead of pointlessly dropping the cache entry and screaming
about it.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
if ((irec = find_inode_rec(mp, agno, agino)) == NULL)
return(NULL);
- size = XFS_FSB_TO_BB(mp, MAX(1, XFS_INODES_PER_CHUNK/inodes_per_block));
+ size = MAX(1, XFS_FSB_TO_BB(mp,
+ mp->m_inode_cluster_size >> mp->m_sb.sb_blocklog));
bp = libxfs_readbuf(mp->m_dev, XFS_AGB_TO_DADDR(mp, agno,
XFS_AGINO_TO_AGBNO(mp, irec->ino_startnum)), size, 0,
&xfs_inode_buf_ops);