xfs: call dax_fault on read page faults for DAX
authorDave Chinner <dchinner@redhat.com>
Wed, 29 Jul 2015 01:48:00 +0000 (11:48 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 29 Jul 2015 01:48:00 +0000 (11:48 +1000)
commitb2442c5a7fe92cca08437070c8a45a7aa0d1703e
treedd16bd4306ef3e81925f883314a88c4f2be11690
parentbc0195aad0daa2ad5b0d76cce22b167bc3435590
xfs: call dax_fault on read page faults for DAX

When modifying the patch series to handle the XFS MMAP_LOCK nesting
of page faults, I botched the conversion of the read page fault
path, and so it is only every calling through the page cache. Re-add
the necessary __dax_fault() call for such files.

Because the get_blocks callback on read faults may not set up the
mapping buffer correctly to allow unwritten extent completion to be
run, we need to allow callers of __dax_fault() to pass a null
complete_unwritten() callback. The DAX code always zeros the
unwritten page when it is read faulted so there are no stale data
exposure issues with not doing the conversion. The only downside
will be the potential for increased CPU overhead on repeated read
faults of the same page. If this proves to be a problem, then the
filesystem needs to fix it's get_block callback and provide a
convert_unwritten() callback to the read fault path.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/dax.c
fs/xfs/xfs_file.c
This page took 0.025433 seconds and 5 git commands to generate.