xfs: refactor dir2 leaf readahead shadow buffer cleverness
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 15 Jun 2017 04:23:05 +0000 (21:23 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 19 Jun 2017 15:59:10 +0000 (08:59 -0700)
commitd205a7d0ec47d11977882b5e910ad35f7be912b4
tree5550ec1613229ac37cafe13adfb06e7e98631ba5
parent7912e7fef2aebe577f0b46d3cba261f2783c5695
xfs: refactor dir2 leaf readahead shadow buffer cleverness

Currently, the dir2 leaf block getdents function uses a complex state
tracking mechanism to create a shadow copy of the block mappings and
then uses the shadow copy to schedule readahead.  Since the read and
readahead functions are perfectly capable of reading the mappings
themselves, we can tear all that out in favor of a simpler function that
simply keeps pushing the readahead window further out.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_dir2_readdir.c