summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-12-21 12:13:03 -0800
committerGreg Kroah-Hartman <gregkh@google.com>2017-10-03 13:45:13 +0000
commit8ef4f0ca7b4d0cefe0f0b42af6106e6510f39ae6 (patch)
treea996b71ff228e91e36edb08d5e9969e395c82b3e /fs
parentd4e5223d818323b401fdefaff076a0e67c44894d (diff)
f2fs: add submit_bio tracepoint
commit 554b5125f5cfca6653461fd52bad24d4ef35ec29 upstream. This patch adds final submit_bio() tracepoint. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/data.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index d7c20880e53e..ccb6fb142d56 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -176,6 +176,10 @@ static inline void __submit_bio(struct f2fs_sb_info *sbi,
current->plug && (type == DATA || type == NODE))
blk_finish_plug(current->plug);
}
+ if (is_read_io(bio_op(bio)))
+ trace_f2fs_submit_read_bio(sbi->sb, type, bio);
+ else
+ trace_f2fs_submit_write_bio(sbi->sb, type, bio);
submit_bio(0, bio);
}
@@ -186,12 +190,12 @@ static void __submit_merged_bio(struct f2fs_bio_info *io)
if (!io->bio)
return;
+ bio_set_op_attrs(io->bio, fio->op, fio->op_flags);
+
if (is_read_io(fio->op))
- trace_f2fs_submit_read_bio(io->sbi->sb, fio, io->bio);
+ trace_f2fs_prepare_read_bio(io->sbi->sb, fio->type, io->bio);
else
- trace_f2fs_submit_write_bio(io->sbi->sb, fio, io->bio);
-
- bio_set_op_attrs(io->bio, fio->op, fio->op_flags);
+ trace_f2fs_prepare_write_bio(io->sbi->sb, fio->type, io->bio);
__submit_bio(io->sbi, io->bio, fio->type);
io->bio = NULL;