mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
xfs: use struct iomap based DAX PMD fault path
Switch xfs_filemap_pmd_fault() from using dax_pmd_fault() to the new and improved dax_iomap_pmd_fault(). Also, now that it has no more users, remove xfs_get_blocks_dax_fault(). Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
parent
642261ac99
commit
862f1b9d67
@ -1298,8 +1298,7 @@ __xfs_get_blocks(
|
|||||||
sector_t iblock,
|
sector_t iblock,
|
||||||
struct buffer_head *bh_result,
|
struct buffer_head *bh_result,
|
||||||
int create,
|
int create,
|
||||||
bool direct,
|
bool direct)
|
||||||
bool dax_fault)
|
|
||||||
{
|
{
|
||||||
struct xfs_inode *ip = XFS_I(inode);
|
struct xfs_inode *ip = XFS_I(inode);
|
||||||
struct xfs_mount *mp = ip->i_mount;
|
struct xfs_mount *mp = ip->i_mount;
|
||||||
@ -1420,13 +1419,8 @@ __xfs_get_blocks(
|
|||||||
if (ISUNWRITTEN(&imap))
|
if (ISUNWRITTEN(&imap))
|
||||||
set_buffer_unwritten(bh_result);
|
set_buffer_unwritten(bh_result);
|
||||||
/* direct IO needs special help */
|
/* direct IO needs special help */
|
||||||
if (create) {
|
if (create)
|
||||||
if (dax_fault)
|
xfs_map_direct(inode, bh_result, &imap, offset, is_cow);
|
||||||
ASSERT(!ISUNWRITTEN(&imap));
|
|
||||||
else
|
|
||||||
xfs_map_direct(inode, bh_result, &imap, offset,
|
|
||||||
is_cow);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1466,7 +1460,7 @@ xfs_get_blocks(
|
|||||||
struct buffer_head *bh_result,
|
struct buffer_head *bh_result,
|
||||||
int create)
|
int create)
|
||||||
{
|
{
|
||||||
return __xfs_get_blocks(inode, iblock, bh_result, create, false, false);
|
return __xfs_get_blocks(inode, iblock, bh_result, create, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -1476,17 +1470,7 @@ xfs_get_blocks_direct(
|
|||||||
struct buffer_head *bh_result,
|
struct buffer_head *bh_result,
|
||||||
int create)
|
int create)
|
||||||
{
|
{
|
||||||
return __xfs_get_blocks(inode, iblock, bh_result, create, true, false);
|
return __xfs_get_blocks(inode, iblock, bh_result, create, true);
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
xfs_get_blocks_dax_fault(
|
|
||||||
struct inode *inode,
|
|
||||||
sector_t iblock,
|
|
||||||
struct buffer_head *bh_result,
|
|
||||||
int create)
|
|
||||||
{
|
|
||||||
return __xfs_get_blocks(inode, iblock, bh_result, create, true, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -59,9 +59,6 @@ int xfs_get_blocks(struct inode *inode, sector_t offset,
|
|||||||
struct buffer_head *map_bh, int create);
|
struct buffer_head *map_bh, int create);
|
||||||
int xfs_get_blocks_direct(struct inode *inode, sector_t offset,
|
int xfs_get_blocks_direct(struct inode *inode, sector_t offset,
|
||||||
struct buffer_head *map_bh, int create);
|
struct buffer_head *map_bh, int create);
|
||||||
int xfs_get_blocks_dax_fault(struct inode *inode, sector_t offset,
|
|
||||||
struct buffer_head *map_bh, int create);
|
|
||||||
|
|
||||||
int xfs_end_io_direct_write(struct kiocb *iocb, loff_t offset,
|
int xfs_end_io_direct_write(struct kiocb *iocb, loff_t offset,
|
||||||
ssize_t size, void *private);
|
ssize_t size, void *private);
|
||||||
int xfs_setfilesize(struct xfs_inode *ip, xfs_off_t offset, size_t size);
|
int xfs_setfilesize(struct xfs_inode *ip, xfs_off_t offset, size_t size);
|
||||||
|
@ -1711,7 +1711,7 @@ xfs_filemap_pmd_fault(
|
|||||||
}
|
}
|
||||||
|
|
||||||
xfs_ilock(XFS_I(inode), XFS_MMAPLOCK_SHARED);
|
xfs_ilock(XFS_I(inode), XFS_MMAPLOCK_SHARED);
|
||||||
ret = dax_pmd_fault(vma, addr, pmd, flags, xfs_get_blocks_dax_fault);
|
ret = dax_iomap_pmd_fault(vma, addr, pmd, flags, &xfs_iomap_ops);
|
||||||
xfs_iunlock(XFS_I(inode), XFS_MMAPLOCK_SHARED);
|
xfs_iunlock(XFS_I(inode), XFS_MMAPLOCK_SHARED);
|
||||||
|
|
||||||
if (flags & FAULT_FLAG_WRITE)
|
if (flags & FAULT_FLAG_WRITE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user