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/readpage.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/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 1ce24a6759a0..1c5db9fd9c8f 100644 --- a/fs/ext4/readpage.c +++ b/fs/ext4/readpage.c @@ -152,11 +152,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); } } |
