]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: don't invalidate whole file on DAX read/write
authorDave Chinner <dchinner@redhat.com>
Tue, 16 Aug 2016 22:31:33 +0000 (08:31 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 16 Aug 2016 22:31:33 +0000 (08:31 +1000)
commitd395a96b8e3580ad56f1ed4477d11f622649cbfa
tree8a1499589ff2f7f04a5d481eb7cc4894468da85e
parent6bef600a21b6b1d6755444155f938e7792d09d07
xfs: don't invalidate whole file on DAX read/write

When we do DAX IO, we try to invalidate the entire page cache held
on the file. This is incorrect as it will trash the entire mapping
tree that now tracks dirty state in exceptional entries in the radix
tree slots.

What we are trying to do is remove cached pages (e.g from reads
into holes) that sit in the radix tree over the range we are about
to write to. Hence we should just limit the invalidation to the
range we are about to overwrite.

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