diff options
author | Chao Yu <chao2.yu@samsung.com> | 2014-12-24 03:08:14 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-01-09 20:02:26 -0500 |
commit | 2ace38e00e54f5c722d8c5eba36d1172548a3466 (patch) | |
tree | decd6b63398abdb9d8f36675960bb45c38375eea | |
parent | 3e1c8f125eeea0f8111e2b9131162bfba32c6381 (diff) |
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: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r-- | fs/f2fs/data.c | 10 | ||||
-rw-r--r-- | include/trace/events/f2fs.h | 37 |
2 files changed, 24 insertions, 23 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 7953bc279205..6308435028f6 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c | |||
@@ -96,11 +96,9 @@ static void __submit_merged_bio(struct f2fs_bio_info *io) | |||
96 | return; | 96 | return; |
97 | 97 | ||
98 | if (is_read_io(fio->rw)) | 98 | if (is_read_io(fio->rw)) |
99 | trace_f2fs_submit_read_bio(io->sbi->sb, fio->rw, | 99 | trace_f2fs_submit_read_bio(io->sbi->sb, fio, io->bio); |
100 | fio->type, io->bio); | ||
101 | else | 100 | else |
102 | trace_f2fs_submit_write_bio(io->sbi->sb, fio->rw, | 101 | trace_f2fs_submit_write_bio(io->sbi->sb, fio, io->bio); |
103 | fio->type, io->bio); | ||
104 | 102 | ||
105 | submit_bio(fio->rw, io->bio); | 103 | submit_bio(fio->rw, io->bio); |
106 | io->bio = NULL; | 104 | io->bio = NULL; |
@@ -137,7 +135,7 @@ int f2fs_submit_page_bio(struct f2fs_sb_info *sbi, struct page *page, | |||
137 | { | 135 | { |
138 | struct bio *bio; | 136 | struct bio *bio; |
139 | 137 | ||
140 | trace_f2fs_submit_page_bio(page, fio->blk_addr, fio->rw, fio->type); | 138 | trace_f2fs_submit_page_bio(page, fio); |
141 | f2fs_trace_ios(page, fio, 0); | 139 | f2fs_trace_ios(page, fio, 0); |
142 | 140 | ||
143 | /* Allocate a new bio */ | 141 | /* Allocate a new bio */ |
@@ -190,7 +188,7 @@ alloc_new: | |||
190 | f2fs_trace_ios(page, fio, 0); | 188 | f2fs_trace_ios(page, fio, 0); |
191 | 189 | ||
192 | up_write(&io->io_rwsem); | 190 | up_write(&io->io_rwsem); |
193 | trace_f2fs_submit_page_mbio(page, fio->blk_addr, fio->rw, fio->type); | 191 | trace_f2fs_submit_page_mbio(page, fio); |
194 | } | 192 | } |
195 | 193 | ||
196 | /* | 194 | /* |
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index 553311f14f6c..13992f3c1445 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h | |||
@@ -650,9 +650,9 @@ TRACE_EVENT(f2fs_reserve_new_block, | |||
650 | 650 | ||
651 | DECLARE_EVENT_CLASS(f2fs__submit_page_bio, | 651 | DECLARE_EVENT_CLASS(f2fs__submit_page_bio, |
652 | 652 | ||
653 | TP_PROTO(struct page *page, block_t blkaddr, int rw, int type), | 653 | TP_PROTO(struct page *page, struct f2fs_io_info *fio), |
654 | 654 | ||
655 | TP_ARGS(page, blkaddr, rw, type), | 655 | TP_ARGS(page, fio), |
656 | 656 | ||
657 | TP_STRUCT__entry( | 657 | TP_STRUCT__entry( |
658 | __field(dev_t, dev) | 658 | __field(dev_t, dev) |
@@ -667,9 +667,9 @@ DECLARE_EVENT_CLASS(f2fs__submit_page_bio, | |||
667 | __entry->dev = page->mapping->host->i_sb->s_dev; | 667 | __entry->dev = page->mapping->host->i_sb->s_dev; |
668 | __entry->ino = page->mapping->host->i_ino; | 668 | __entry->ino = page->mapping->host->i_ino; |
669 | __entry->index = page->index; | 669 | __entry->index = page->index; |
670 | __entry->blkaddr = blkaddr; | 670 | __entry->blkaddr = fio->blk_addr; |
671 | __entry->rw = rw; | 671 | __entry->rw = fio->rw; |
672 | __entry->type = type; | 672 | __entry->type = fio->type; |
673 | ), | 673 | ), |
674 | 674 | ||
675 | TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, " | 675 | TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, " |
@@ -683,27 +683,28 @@ DECLARE_EVENT_CLASS(f2fs__submit_page_bio, | |||
683 | 683 | ||
684 | DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_bio, | 684 | DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_bio, |
685 | 685 | ||
686 | TP_PROTO(struct page *page, block_t blkaddr, int rw, int type), | 686 | TP_PROTO(struct page *page, struct f2fs_io_info *fio), |
687 | 687 | ||
688 | TP_ARGS(page, blkaddr, rw, type), | 688 | TP_ARGS(page, fio), |
689 | 689 | ||
690 | TP_CONDITION(page->mapping) | 690 | TP_CONDITION(page->mapping) |
691 | ); | 691 | ); |
692 | 692 | ||
693 | DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_mbio, | 693 | DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_mbio, |
694 | 694 | ||
695 | TP_PROTO(struct page *page, block_t blkaddr, int rw, int type), | 695 | TP_PROTO(struct page *page, struct f2fs_io_info *fio), |
696 | 696 | ||
697 | TP_ARGS(page, blkaddr, rw, type), | 697 | TP_ARGS(page, fio), |
698 | 698 | ||
699 | TP_CONDITION(page->mapping) | 699 | TP_CONDITION(page->mapping) |
700 | ); | 700 | ); |
701 | 701 | ||
702 | DECLARE_EVENT_CLASS(f2fs__submit_bio, | 702 | DECLARE_EVENT_CLASS(f2fs__submit_bio, |
703 | 703 | ||
704 | TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio), | 704 | TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio, |
705 | struct bio *bio), | ||
705 | 706 | ||
706 | TP_ARGS(sb, rw, type, bio), | 707 | TP_ARGS(sb, fio, bio), |
707 | 708 | ||
708 | TP_STRUCT__entry( | 709 | TP_STRUCT__entry( |
709 | __field(dev_t, dev) | 710 | __field(dev_t, dev) |
@@ -715,8 +716,8 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio, | |||
715 | 716 | ||
716 | TP_fast_assign( | 717 | TP_fast_assign( |
717 | __entry->dev = sb->s_dev; | 718 | __entry->dev = sb->s_dev; |
718 | __entry->rw = rw; | 719 | __entry->rw = fio->rw; |
719 | __entry->type = type; | 720 | __entry->type = fio->type; |
720 | __entry->sector = bio->bi_iter.bi_sector; | 721 | __entry->sector = bio->bi_iter.bi_sector; |
721 | __entry->size = bio->bi_iter.bi_size; | 722 | __entry->size = bio->bi_iter.bi_size; |
722 | ), | 723 | ), |
@@ -731,18 +732,20 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio, | |||
731 | 732 | ||
732 | DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_write_bio, | 733 | DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_write_bio, |
733 | 734 | ||
734 | TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio), | 735 | TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio, |
736 | struct bio *bio), | ||
735 | 737 | ||
736 | TP_ARGS(sb, rw, type, bio), | 738 | TP_ARGS(sb, fio, bio), |
737 | 739 | ||
738 | TP_CONDITION(bio) | 740 | TP_CONDITION(bio) |
739 | ); | 741 | ); |
740 | 742 | ||
741 | DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_read_bio, | 743 | DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_read_bio, |
742 | 744 | ||
743 | TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio), | 745 | TP_PROTO(struct super_block *sb, struct f2fs_io_info *fio, |
746 | struct bio *bio), | ||
744 | 747 | ||
745 | TP_ARGS(sb, rw, type, bio), | 748 | TP_ARGS(sb, fio, bio), |
746 | 749 | ||
747 | TP_CONDITION(bio) | 750 | TP_CONDITION(bio) |
748 | ); | 751 | ); |