xfs: xfs_iflush_cluster has range issues
authorDave Chinner <dchinner@redhat.com>
Wed, 18 May 2016 04:09:13 +0000 (14:09 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 18 May 2016 04:09:13 +0000 (14:09 +1000)
commit5a90e53e8124d3ebe4b2a6309fa3c3225c23a62a
tree8f7e49a8ade7b8837c8625f765ef2aaaa450a48e
parent8a17d7ddedb4d9031f046ae0e97c40b46aa69db5
xfs: xfs_iflush_cluster has range issues

xfs_iflush_cluster() does a gang lookup on the radix tree, meaning
it can find inodes beyond the current cluster if there is sparse
cache population. gang lookups return results in ascending index
order, so stop trying to cluster inodes once the first inode outside
the cluster mask is detected.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_inode.c