• D
    xfs: call dax_fault on read page faults for DAX · b2442c5a
    Dave Chinner 提交于
    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: NDave Chinner <dchinner@redhat.com>
    Reviewed-by: NMatthew Wilcox <willy@linux.intel.com>
    Reviewed-by: NBrian Foster <bfoster@redhat.com>
    Signed-off-by: NDave Chinner <david@fromorbit.com>
    b2442c5a
xfs_file.c 41.0 KB