aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-11-29 22:51:14 -0500
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-12-22 20:18:05 -0500
commit93dfe2ac516250755f7d5edd438b0ce67c0e3aa6 (patch)
tree66a4821769e2feb60de4265b8b9d7b03706d544d /include
parent187b5b8b3dfcfc73126f2743c89cc47df3bf07be (diff)
f2fs: refactor bio-related operations
This patch integrates redundant bio operations on read and write IOs. 1. Move bio-related codes to the top of data.c. 2. Replace f2fs_submit_bio with f2fs_submit_merged_bio, which handles read bios additionally. 3. Introduce __submit_merged_bio to submit the merged bio. 4. Change f2fs_readpage to f2fs_submit_page_bio. 5. Introduce f2fs_submit_page_mbio to integrate previous submit_read_page and submit_write_page. Reviewed-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Reviewed-by: Chao Yu <chao2.yu@samsung.com > Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/f2fs.h30
1 files changed, 10 insertions, 20 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 204fcc3201b1..3b9f28dfc849 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -434,7 +434,7 @@ TRACE_EVENT(f2fs_truncate_partial_nodes,
434 __entry->err) 434 __entry->err)
435); 435);
436 436
437TRACE_EVENT_CONDITION(f2fs_readpage, 437TRACE_EVENT_CONDITION(f2fs_submit_page_bio,
438 438
439 TP_PROTO(struct page *page, sector_t blkaddr, int type), 439 TP_PROTO(struct page *page, sector_t blkaddr, int type),
440 440
@@ -641,18 +641,22 @@ DECLARE_EVENT_CLASS(f2fs__submit_bio,
641 __entry->size) 641 __entry->size)
642); 642);
643 643
644DEFINE_EVENT(f2fs__submit_bio, f2fs_submit_write_bio, 644DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_write_bio,
645 645
646 TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio), 646 TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio),
647 647
648 TP_ARGS(sb, rw, type, bio) 648 TP_ARGS(sb, rw, type, bio),
649
650 TP_CONDITION(bio)
649); 651);
650 652
651DEFINE_EVENT(f2fs__submit_bio, f2fs_submit_read_bio, 653DEFINE_EVENT_CONDITION(f2fs__submit_bio, f2fs_submit_read_bio,
652 654
653 TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio), 655 TP_PROTO(struct super_block *sb, int rw, int type, struct bio *bio),
654 656
655 TP_ARGS(sb, rw, type, bio) 657 TP_ARGS(sb, rw, type, bio),
658
659 TP_CONDITION(bio)
656); 660);
657 661
658DECLARE_EVENT_CLASS(f2fs__page, 662DECLARE_EVENT_CLASS(f2fs__page,
@@ -701,7 +705,7 @@ DEFINE_EVENT(f2fs__page, f2fs_vm_page_mkwrite,
701 TP_ARGS(page, type) 705 TP_ARGS(page, type)
702); 706);
703 707
704DECLARE_EVENT_CLASS(f2fs_io_page, 708TRACE_EVENT(f2fs_submit_page_mbio,
705 709
706 TP_PROTO(struct page *page, int rw, int type, block_t blk_addr), 710 TP_PROTO(struct page *page, int rw, int type, block_t blk_addr),
707 711
@@ -733,20 +737,6 @@ DECLARE_EVENT_CLASS(f2fs_io_page,
733 (unsigned long long)__entry->block) 737 (unsigned long long)__entry->block)
734); 738);
735 739
736DEFINE_EVENT(f2fs_io_page, f2fs_submit_write_page,
737
738 TP_PROTO(struct page *page, int rw, int type, block_t blk_addr),
739
740 TP_ARGS(page, rw, type, blk_addr)
741);
742
743DEFINE_EVENT(f2fs_io_page, f2fs_submit_read_page,
744
745 TP_PROTO(struct page *page, int rw, int type, block_t blk_addr),
746
747 TP_ARGS(page, rw, type, blk_addr)
748);
749
750TRACE_EVENT(f2fs_write_checkpoint, 740TRACE_EVENT(f2fs_write_checkpoint,
751 741
752 TP_PROTO(struct super_block *sb, bool is_umount, char *msg), 742 TP_PROTO(struct super_block *sb, bool is_umount, char *msg),