diff options
author | Gu Zheng <guz.fnst@cn.fujitsu.com> | 2013-12-20 05:17:49 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-12-22 20:18:07 -0500 |
commit | 7e8f23081ab3a11de90d7389f2c6fd44676c8df9 (patch) | |
tree | 6570134b285d7e62c55c175fcb8ea9c1e1dbd912 /fs/f2fs | |
parent | 940a6d34b31b96f0748a4b688a551a0890b2b229 (diff) |
f2fs: remove the rw_flag domain from f2fs_io_info
When using the f2fs_io_info in the low level, we still need to merge the
rw and rw_flag, so use the rw to hold all the io flags directly,
and remove the rw_flag field.
ps.It is based on the previous patch:
f2fs: move all the bio initialization into __bio_alloc
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/data.c | 3 | ||||
-rw-r--r-- | fs/f2fs/f2fs.h | 5 | ||||
-rw-r--r-- | fs/f2fs/gc.c | 1 | ||||
-rw-r--r-- | fs/f2fs/node.c | 6 | ||||
-rw-r--r-- | fs/f2fs/segment.c | 8 |
5 files changed, 7 insertions, 16 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 154a4f93a548..e46b5c52d2ed 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c | |||
@@ -105,7 +105,7 @@ static void __submit_merged_bio(struct f2fs_bio_info *io) | |||
105 | if (!io->bio) | 105 | if (!io->bio) |
106 | return; | 106 | return; |
107 | 107 | ||
108 | rw = fio->rw | fio->rw_flag; | 108 | rw = fio->rw; |
109 | 109 | ||
110 | if (is_read_io(rw)) { | 110 | if (is_read_io(rw)) { |
111 | trace_f2fs_submit_read_bio(io->sbi->sb, rw, | 111 | trace_f2fs_submit_read_bio(io->sbi->sb, rw, |
@@ -760,7 +760,6 @@ static int f2fs_write_data_page(struct page *page, | |||
760 | struct f2fs_io_info fio = { | 760 | struct f2fs_io_info fio = { |
761 | .type = DATA, | 761 | .type = DATA, |
762 | .rw = (wbc->sync_mode == WB_SYNC_ALL) ? WRITE_SYNC: WRITE, | 762 | .rw = (wbc->sync_mode == WB_SYNC_ALL) ? WRITE_SYNC: WRITE, |
763 | .rw_flag = 0, | ||
764 | }; | 763 | }; |
765 | 764 | ||
766 | if (page->index < end_index) | 765 | if (page->index < end_index) |
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 8cbc5a6bf484..42f28d4134c9 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h | |||
@@ -368,9 +368,8 @@ enum page_type { | |||
368 | }; | 368 | }; |
369 | 369 | ||
370 | struct f2fs_io_info { | 370 | struct f2fs_io_info { |
371 | enum page_type type; /* contains DATA/NODE/META/META_FLUSH */ | 371 | enum page_type type; /* contains DATA/NODE/META/META_FLUSH */ |
372 | int rw; /* contains R/RS/W/WS */ | 372 | int rw; /* contains R/RS/W/WS with REQ_META/REQ_PRIO */ |
373 | int rw_flag; /* contains REQ_META/REQ_PRIO */ | ||
374 | }; | 373 | }; |
375 | 374 | ||
376 | #define is_read_io(rw) (((rw) & 1) == READ) | 375 | #define is_read_io(rw) (((rw) & 1) == READ) |
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 69c18e399014..599f546d042c 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c | |||
@@ -523,7 +523,6 @@ static void move_data_page(struct inode *inode, struct page *page, int gc_type) | |||
523 | struct f2fs_io_info fio = { | 523 | struct f2fs_io_info fio = { |
524 | .type = DATA, | 524 | .type = DATA, |
525 | .rw = WRITE_SYNC, | 525 | .rw = WRITE_SYNC, |
526 | .rw_flag = 0, | ||
527 | }; | 526 | }; |
528 | 527 | ||
529 | if (gc_type == BG_GC) { | 528 | if (gc_type == BG_GC) { |
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 3565caf97005..0af0a715e367 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c | |||
@@ -94,8 +94,7 @@ static void ra_nat_pages(struct f2fs_sb_info *sbi, int nid) | |||
94 | int i; | 94 | int i; |
95 | struct f2fs_io_info fio = { | 95 | struct f2fs_io_info fio = { |
96 | .type = META, | 96 | .type = META, |
97 | .rw = READ_SYNC, | 97 | .rw = READ_SYNC | REQ_META | REQ_PRIO |
98 | .rw_flag = REQ_META | REQ_PRIO | ||
99 | }; | 98 | }; |
100 | 99 | ||
101 | 100 | ||
@@ -1581,8 +1580,7 @@ static int ra_sum_pages(struct f2fs_sb_info *sbi, struct list_head *pages, | |||
1581 | int page_idx = start; | 1580 | int page_idx = start; |
1582 | struct f2fs_io_info fio = { | 1581 | struct f2fs_io_info fio = { |
1583 | .type = META, | 1582 | .type = META, |
1584 | .rw = READ_SYNC, | 1583 | .rw = READ_SYNC | REQ_META | REQ_PRIO |
1585 | .rw_flag = REQ_META | REQ_PRIO | ||
1586 | }; | 1584 | }; |
1587 | 1585 | ||
1588 | for (; page_idx < start + nrpages; page_idx++) { | 1586 | for (; page_idx < start + nrpages; page_idx++) { |
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 9f8bdd02e3a8..555ae7693ea0 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c | |||
@@ -916,8 +916,7 @@ void write_meta_page(struct f2fs_sb_info *sbi, struct page *page) | |||
916 | { | 916 | { |
917 | struct f2fs_io_info fio = { | 917 | struct f2fs_io_info fio = { |
918 | .type = META, | 918 | .type = META, |
919 | .rw = WRITE_SYNC, | 919 | .rw = WRITE_SYNC | REQ_META | REQ_PRIO |
920 | .rw_flag = REQ_META | REQ_PRIO | ||
921 | }; | 920 | }; |
922 | 921 | ||
923 | set_page_writeback(page); | 922 | set_page_writeback(page); |
@@ -931,7 +930,6 @@ void write_node_page(struct f2fs_sb_info *sbi, struct page *page, | |||
931 | struct f2fs_io_info fio = { | 930 | struct f2fs_io_info fio = { |
932 | .type = NODE, | 931 | .type = NODE, |
933 | .rw = WRITE_SYNC, | 932 | .rw = WRITE_SYNC, |
934 | .rw_flag = 0 | ||
935 | }; | 933 | }; |
936 | 934 | ||
937 | set_summary(&sum, nid, 0, 0); | 935 | set_summary(&sum, nid, 0, 0); |
@@ -1018,7 +1016,6 @@ void rewrite_node_page(struct f2fs_sb_info *sbi, | |||
1018 | struct f2fs_io_info fio = { | 1016 | struct f2fs_io_info fio = { |
1019 | .type = NODE, | 1017 | .type = NODE, |
1020 | .rw = WRITE_SYNC, | 1018 | .rw = WRITE_SYNC, |
1021 | .rw_flag = 0 | ||
1022 | }; | 1019 | }; |
1023 | 1020 | ||
1024 | curseg = CURSEG_I(sbi, type); | 1021 | curseg = CURSEG_I(sbi, type); |
@@ -1598,8 +1595,7 @@ static int ra_sit_pages(struct f2fs_sb_info *sbi, int start, int nrpages) | |||
1598 | int blkno = start; | 1595 | int blkno = start; |
1599 | struct f2fs_io_info fio = { | 1596 | struct f2fs_io_info fio = { |
1600 | .type = META, | 1597 | .type = META, |
1601 | .rw = READ_SYNC, | 1598 | .rw = READ_SYNC | REQ_META | REQ_PRIO |
1602 | .rw_flag = REQ_META | REQ_PRIO | ||
1603 | }; | 1599 | }; |
1604 | 1600 | ||
1605 | for (; blkno < start + nrpages && blkno < sit_blk_cnt; blkno++) { | 1601 | for (; blkno < start + nrpages && blkno < sit_blk_cnt; blkno++) { |