diff options
| author | Mohan Srinivasan <srmohan@google.com> | 2017-02-03 15:48:03 -0800 |
|---|---|---|
| committer | Mohan Srinivasan <srmohan@google.com> | 2017-02-10 19:09:14 +0000 |
| commit | d854b688907b34fcab97fc3b58000084255ee53a (patch) | |
| tree | 8a0b17c2c9f6b493b60b20d87431359cfc5abe48 /fs/ext4/inline.c | |
| parent | 11fac3aed57f1ef25755fbdb167c31cc322e2b09 (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
Signed-off-by: Mohan Srinivasan <srmohan@google.com>
Diffstat (limited to 'fs/ext4/inline.c')
| -rw-r--r-- | fs/ext4/inline.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index af34979684a4..3c0ee824f512 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -501,8 +501,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, |
