Re: [PATCH 4/7] xfs: use ranged writeback and invalidation for direct IO

Christoph Hellwig
2014-08-29T00:40:49Z

On Thu, Aug 28, 2014 at 09:49:08PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> Now we are not doing silly things with dirtying buffers beyond EOF
> and using invalidation correctly, we can finally reduce the ranges of
> writeback and invalidation used by direct IO to match that of the IO
> being issued.
>
> Bring the writeback and invalidation ranges back to match the
> generic direct IO code - this will greatly reduce the perturbation
> of cached data when direct IO and buffered IO are mixed, but still
> provide the same buffered vs direct IO coherency behaviour we
> currently have.
>
> Signed-off-by: Dave Chinner <dchinner@redhat.com>

Looks correct, although I wonder if it's really worth the risk exposing
us to the crazy details of the page cache invalidation range notations..

Reviewed-by: Christoph Hellwig <hch@lst.de>