xfs: don't take the IOLOCK exclusive for direct I/O page invalidation
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Oct 2016 04:44:14 +0000 (15:44 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 20 Oct 2016 04:44:14 +0000 (15:44 +1100)
commit0ee7a3f6b5b2f22bb69bfc6c60d0ea0777003098
tree278d0568b458b31cda20fdafd0c60745b69a34c6
parentf1b8243c55ca6fd2a3898e2f586b8cfcfff684bb
xfs: don't take the IOLOCK exclusive for direct I/O page invalidation

XFS historically took the iolock exclusive when invalidating pages
before direct I/O operations to protect against writeback starvations.

But this writeback starvation issues has been fixed a long time ago
in the core writeback code, and all other file systems manage to do
without the exclusive lock.  Convert XFS over to avoid the exclusive
lock in this case, and also move to range invalidations like done
by the other file systems.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_file.c