summaryrefslogtreecommitdiff
path: root/fs/ext4/inline.c
diff options
context:
space:
mode:
authorMohan Srinivasan <srmohan@google.com>2017-02-03 15:48:03 -0800
committerRunmin Wang <runminw@codeaurora.org>2017-04-17 10:31:31 -0700
commit4918990f6bf31e270f437fab434f379cef1cd77f (patch)
tree4b3ecd4aedb93bb1899a45fd4fecfb59833f10d3 /fs/ext4/inline.c
parentbb4bf9d359f6c8f5ce24d546eed87f8c940f7921 (diff)
ANDROID: Refactor fs readpage/write tracepoints.
Refactor the fs readpage/write tracepoints to move the inode->path lookup outside the tracepoint code, and pass a pointer to the path into the tracepoint code instead. This is necessary because the tracepoint code runs non-preemptible. Thanks to Trilok Soni for catching this in 4.4. Change-Id: I7486c5947918d155a30c61d6b9cd5027cf8fbe15 Git-commit: d854b688907b34fcab97fc3b58000084255ee53a Git-repo: https://android.googlesource.com/kernel/common/ Signed-off-by: Mohan Srinivasan <srmohan@google.com> Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Diffstat (limited to 'fs/ext4/inline.c')
-rw-r--r--fs/ext4/inline.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index eb5a10228013..db81acb686c0 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -503,8 +503,16 @@ int ext4_readpage_inline(struct inode *inode, struct page *page)
return -EAGAIN;
}
- trace_android_fs_dataread_start(inode, page_offset(page), PAGE_SIZE,
- current->pid, current->comm);
+ if (trace_android_fs_dataread_start_enabled()) {
+ char *path, pathbuf[MAX_TRACE_PATHBUF_LEN];
+
+ path = android_fstrace_get_pathname(pathbuf,
+ MAX_TRACE_PATHBUF_LEN,
+ inode);
+ trace_android_fs_dataread_start(inode, page_offset(page),
+ PAGE_SIZE, current->pid,
+ path, current->comm);
+ }
/*
* Current inline data can only exist in the 1st page,