Commit 2ace38e0 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: cleanup parameters for trace_f2fs_submit_{read_,write_,page_,page_m}bio with fio

Cleanup parameters for trace_f2fs_submit_{read_,write_,page_,page_m}bio with fio
as one parameter.
Suggested-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 3e1c8f12
...@@ -96,11 +96,9 @@ static void __submit_merged_bio(struct f2fs_bio_info *io) ...@@ -96,11 +96,9 @@ static void __submit_merged_bio(struct f2fs_bio_info *io)
return; return;
if (is_read_io(fio->rw)) if (is_read_io(fio->rw))
trace_f2fs_submit_read_bio(io->sbi->sb, fio->rw, trace_f2fs_submit_read_bio(io->sbi->sb, fio, io->bio);
fio->type, io->bio);
else else
trace_f2fs_submit_write_bio(io->sbi->sb, fio->rw, trace_f2fs_submit_write_bio(io->sbi->sb, fio, io->bio);
fio->type, io->bio);
submit_bio(fio->rw, io->bio); submit_bio(fio->rw, io->bio);
io->bio = NULL; io->bio = NULL;
...@@ -137,7 +135,7 @@ int f2fs_submit_page_bio(struct f2fs_sb_info *sbi, struct page *page, ...@@ -137,7 +135,7 @@ int f2fs_submit_page_bio(struct f2fs_sb_info *sbi, struct page *page,
{ {
struct bio *bio; struct bio *bio;
trace_f2fs_submit_page_bio(page, fio->blk_addr, fio->rw, fio->type); trace_f2fs_submit_page_bio(page, fio);
f2fs_trace_ios(page, fio, 0); f2fs_trace_ios(page, fio, 0);
/* Allocate a new bio */ /* Allocate a new bio */
...@@ -190,7 +188,7 @@ void f2fs_submit_page_mbio(struct f2fs_sb_info *sbi, struct page *page, ...@@ -190,7 +188,7 @@ void f2fs_submit_page_mbio(struct f2fs_sb_info *sbi, struct page *page,
f2fs_trace_ios(page, fio, 0); f2fs_trace_ios(page, fio, 0);
up_write(&io->io_rwsem); up_write(&io->io_rwsem);
trace_f2fs_submit_page_mbio(page, fio->blk_addr, fio->rw, fio->type); trace_f2fs_submit_page_mbio(page, fio);
} }
/* /*
......
...@@ -650,9 +650,9 @@ TRACE_EVENT(f2fs_reserve_new_block, ...@@ -650,9 +650,9 @@ TRACE_EVENT(f2fs_reserve_new_block,
DECLARE_EVENT_CLASS(f2fs__submit_page_bio, DECLARE_EVENT_CLASS(f2fs__submit_page_bio,
TP_PROTO(struct page *page, block_t blkaddr, int rw, int type), TP_PROTO(struct page *page, struct f2fs_io_info *fio),
TP_ARGS(page, blkaddr, rw, type), TP_ARGS(page, fio),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(dev_t, dev) __field(dev_t, dev)
...@@ -667,9 +667,9 @@ DECLARE_EVENT_CLASS(f2fs__submit_page_bio, ...@@ -667,9 +667,9 @@ DECLARE_EVENT_CLASS(f2fs__submit_page_bio,
__entry->dev = page->mapping->host->i_sb->s_dev; __entry->dev = page->mapping->host->i_sb->s_dev;
__entry->ino = page->mapping->host->i_ino; __entry->ino = page->mapping->host->i_ino;
__entry->index = page->index; __entry->index = page->index;
__entry->blkaddr = blkaddr; __entry->blkaddr = fio->blk_addr;
__entry->rw = rw; __entry->rw = fio->rw;
__entry->type = type; __entry->type = fio->type;
), ),
TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, " TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, "
...@@ -683,27 +683,28 @@ DECLARE_EVENT_CLASS(f2fs__submit_page_bio, ...@@ -683,27 +683,28 @@ DECLARE_EVENT_CLASS(f2fs__submit_page_bio,
DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_bio, DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_bio,
TP_PROTO(struct page *page, block_t blkaddr, int rw, int type), TP_PROTO(struct page *page, struct f2fs_io_info *fio),
TP_ARGS(page, blkaddr, rw, type), TP_ARGS(page, fio),
TP_CONDITION(page->mapping) TP_CONDITION(page->mapping)
); );
DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_mbio, DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_mbio,
TP_PROTO(struct page *page, block_t blkaddr, int rw, int type), TP_PROTO(struct page *page, struct f2fs_io_info *fio),
TP_ARGS(page, blkaddr, rw, type), TP_ARGS(page, fio),
TP_CONDITION(page->mapping) TP_CONDITION(page->mapping)
); );
DECLARE_EVENT_CLASS(f2fs__submit_bio, DECLARE_EVENT_CLASS(f2fs__submit_bio,
TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio), TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio,
struct bio *bio),
TP_ARGS(sb, rw, type, bio), TP_ARGS(sb, fio, bio),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(dev_t, dev) __field(dev_t, dev)
...@@ -715,8 +716,8 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio, ...@@ -715,8 +716,8 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio,
TP_fast_assign( TP_fast_assign(
__entry->dev = sb->s_dev; __entry->dev = sb->s_dev;
__entry->rw = rw; __entry->rw = fio->rw;
__entry->type = type; __entry->type = fio->type;
__entry->sector = bio->bi_iter.bi_sector; __entry->sector = bio->bi_iter.bi_sector;
__entry->size = bio->bi_iter.bi_size; __entry->size = bio->bi_iter.bi_size;
), ),
...@@ -731,18 +732,20 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio, ...@@ -731,18 +732,20 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio,
DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_write_bio, DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_write_bio,
TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio), TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio,
struct bio *bio),
TP_ARGS(sb, rw, type, bio), TP_ARGS(sb, fio, bio),
TP_CONDITION(bio) TP_CONDITION(bio)
); );
DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_read_bio, DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_read_bio,
TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio), TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio,
struct bio *bio),
TP_ARGS(sb, rw, type, bio), TP_ARGS(sb, fio, bio),
TP_CONDITION(bio) TP_CONDITION(bio)
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment