diff options
author | Mohan Srinivasan <srmohan@google.com> | 2017-02-03 15:48:03 -0800 |
---|---|---|
committer | Runmin Wang <runminw@codeaurora.org> | 2017-04-17 10:31:31 -0700 |
commit | 4918990f6bf31e270f437fab434f379cef1cd77f (patch) | |
tree | 4b3ecd4aedb93bb1899a45fd4fecfb59833f10d3 /fs/ext4/readpage.c | |
parent | bb4bf9d359f6c8f5ce24d546eed87f8c940f7921 (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/readpage.c')
-rw-r--r-- | fs/ext4/readpage.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c index 091ec08a5100..99f1bd8c7f05 100644 --- a/fs/ext4/readpage.c +++ b/fs/ext4/readpage.c @@ -158,11 +158,17 @@ ext4_submit_bio_read(struct bio *bio) struct page *first_page = bio->bi_io_vec[0].bv_page; if (first_page != NULL) { + char *path, pathbuf[MAX_TRACE_PATHBUF_LEN]; + + path = android_fstrace_get_pathname(pathbuf, + MAX_TRACE_PATHBUF_LEN, + first_page->mapping->host); trace_android_fs_dataread_start( first_page->mapping->host, page_offset(first_page), bio->bi_iter.bi_size, current->pid, + path, current->comm); } } |