summaryrefslogtreecommitdiffstats
path: root/fs/afs/file.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2017-11-02 15:27:53 +0000
committerDavid Howells <dhowells@redhat.com>2017-11-13 15:38:21 +0000
commit13524ab3c6f41bcd257d28644414297bea8282b7 (patch)
tree9ac5ab8bfd44026bb13783cf540f4fdb57d72d44 /fs/afs/file.c
parent1cf7a1518aefa69ac6ba0c3f9206073e4221e3c8 (diff)
downloadlinux-13524ab3c6f41bcd257d28644414297bea8282b7.tar.bz2
afs: Trace page dirty/clean
Add a trace event that logs the dirtying and cleaning of pages attached to AFS inodes. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/file.c')
-rw-r--r--fs/afs/file.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c
index 675c5c268a52..a39192ced99e 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -583,6 +583,9 @@ static int afs_readpages(struct file *file, struct address_space *mapping,
static void afs_invalidatepage(struct page *page, unsigned int offset,
unsigned int length)
{
+ struct afs_vnode *vnode = AFS_FS_I(page->mapping->host);
+ unsigned long priv;
+
_enter("{%lu},%u,%u", page->index, offset, length);
BUG_ON(!PageLocked(page));
@@ -598,6 +601,9 @@ static void afs_invalidatepage(struct page *page, unsigned int offset,
#endif
if (PagePrivate(page)) {
+ priv = page_private(page);
+ trace_afs_page_dirty(vnode, tracepoint_string("inval"),
+ page->index, priv);
set_page_private(page, 0);
ClearPagePrivate(page);
}
@@ -613,6 +619,7 @@ static void afs_invalidatepage(struct page *page, unsigned int offset,
static int afs_releasepage(struct page *page, gfp_t gfp_flags)
{
struct afs_vnode *vnode = AFS_FS_I(page->mapping->host);
+ unsigned long priv;
_enter("{{%x:%u}[%lu],%lx},%x",
vnode->fid.vid, vnode->fid.vnode, page->index, page->flags,
@@ -628,6 +635,9 @@ static int afs_releasepage(struct page *page, gfp_t gfp_flags)
#endif
if (PagePrivate(page)) {
+ priv = page_private(page);
+ trace_afs_page_dirty(vnode, tracepoint_string("rel"),
+ page->index, priv);
set_page_private(page, 0);
ClearPagePrivate(page);
}