diff options
author | Christoph Hellwig <hch@lst.de> | 2024-10-29 16:11:57 +0100 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2024-11-05 13:52:57 +0100 |
commit | 1171de329692163470f1cde7cc99f89487ca555a (patch) | |
tree | 10ef423806466147889dd993a3a4950f5f30b555 /fs/xfs/xfs_file.c | |
parent | 59e43f5479cce106d71c0b91a297c7ad1913176c (diff) |
xfs: split the page fault trace event
Split the xfs_filemap_fault trace event into separate ones for read and
write faults and move them into the applicable locations.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r-- | fs/xfs/xfs_file.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index b19916b11fd5..20f7f92b8867 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@ -1425,6 +1425,8 @@ xfs_dax_read_fault( struct xfs_inode *ip = XFS_I(file_inode(vmf->vma->vm_file)); vm_fault_t ret; + trace_xfs_read_fault(ip, order); + xfs_ilock(ip, XFS_MMAPLOCK_SHARED); ret = xfs_dax_fault_locked(vmf, order, false); xfs_iunlock(ip, XFS_MMAPLOCK_SHARED); @@ -1442,6 +1444,8 @@ xfs_write_fault( unsigned int lock_mode = XFS_MMAPLOCK_SHARED; vm_fault_t ret; + trace_xfs_write_fault(ip, order); + sb_start_pagefault(inode->i_sb); file_update_time(vmf->vma->vm_file); @@ -1485,12 +1489,12 @@ __xfs_filemap_fault( { struct inode *inode = file_inode(vmf->vma->vm_file); - trace_xfs_filemap_fault(XFS_I(inode), order, write_fault); - if (write_fault) return xfs_write_fault(vmf, order); if (IS_DAX(inode)) return xfs_dax_read_fault(vmf, order); + + trace_xfs_read_fault(XFS_I(inode), order); return filemap_fault(vmf); } |