summaryrefslogtreecommitdiff
path: root/fs/ext4/inline.c
diff options
context:
space:
mode:
authorMohan Srinivasan <srmohan@google.com>2016-09-19 17:33:50 -0700
committerRunmin Wang <runminw@codeaurora.org>2017-04-17 10:31:20 -0700
commitbb4bf9d359f6c8f5ce24d546eed87f8c940f7921 (patch)
treea8c92e6fec564d2274e262357c1c75946be477c6 /fs/ext4/inline.c
parent0293b8a7d07a2ef84bd227b81f20b966af900c51 (diff)
ANDROID: fs: FS tracepoints to track IO.
Adds tracepoints in ext4/f2fs/mpage to track readpages/buffered write()s. This allows us to track files that are being read/written to PIDs. Change-Id: I26bd36f933108927d6903da04d8cb42fd9c3ef3d Signed-off-by: Mohan Srinivasan <srmohan@google.com> Git-commit: 32cbbe59538d2dd0b77822cc27ce32ca487c467d Git-repo: https://android.googlesource.com/kernel/common/ [runminw@codeaurora.org: resolve trivial merge conflicts] Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Diffstat (limited to 'fs/ext4/inline.c')
-rw-r--r--fs/ext4/inline.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index cb3d6f6419cd..eb5a10228013 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -18,6 +18,7 @@
#include "ext4.h"
#include "xattr.h"
#include "truncate.h"
+#include <trace/events/android_fs.h>
#define EXT4_XATTR_SYSTEM_DATA "data"
#define EXT4_MIN_INLINE_DATA_SIZE ((sizeof(__le32) * EXT4_N_BLOCKS))
@@ -502,6 +503,9 @@ 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);
+
/*
* Current inline data can only exist in the 1st page,
* So for all the other pages, just set them uptodate.
@@ -513,6 +517,8 @@ int ext4_readpage_inline(struct inode *inode, struct page *page)
SetPageUptodate(page);
}
+ trace_android_fs_dataread_end(inode, page_offset(page), PAGE_SIZE);
+
up_read(&EXT4_I(inode)->xattr_sem);
unlock_page(page);