diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2023-01-19 16:33:49 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2023-02-14 14:22:33 -0500 |
commit | eb5654b3b89d5e836312cea9f3fdb49457852e89 (patch) | |
tree | a779387d613b4a425ab482c128d7575fcf3ebce5 /fs/nfs/file.c | |
parent | 96780ca55e3cbf4f150fd5a833a61492c9947b5b (diff) | |
download | lwn-eb5654b3b89d5e836312cea9f3fdb49457852e89.tar.gz lwn-eb5654b3b89d5e836312cea9f3fdb49457852e89.zip |
NFS: Enable tracing of nfs_invalidate_folio() and nfs_launder_folio()
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r-- | fs/nfs/file.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 3bed75c5250b..bcade290605a 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -411,14 +411,16 @@ static int nfs_write_end(struct file *file, struct address_space *mapping, static void nfs_invalidate_folio(struct folio *folio, size_t offset, size_t length) { + struct inode *inode = folio_file_mapping(folio)->host; dfprintk(PAGECACHE, "NFS: invalidate_folio(%lu, %zu, %zu)\n", folio->index, offset, length); if (offset != 0 || length < folio_size(folio)) return; /* Cancel any unstarted writes on this page */ - nfs_wb_folio_cancel(folio->mapping->host, folio); + nfs_wb_folio_cancel(inode, folio); folio_wait_fscache(folio); + trace_nfs_invalidate_folio(inode, folio); } /* @@ -479,12 +481,15 @@ static void nfs_check_dirty_writeback(struct folio *folio, static int nfs_launder_folio(struct folio *folio) { struct inode *inode = folio->mapping->host; + int ret; dfprintk(PAGECACHE, "NFS: launder_folio(%ld, %llu)\n", inode->i_ino, folio_pos(folio)); folio_wait_fscache(folio); - return nfs_wb_folio(inode, folio); + ret = nfs_wb_folio(inode, folio); + trace_nfs_launder_folio_done(inode, folio, ret); + return ret; } static int nfs_swap_activate(struct swap_info_struct *sis, struct file *file, |