diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-04-23 14:38:15 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-05-28 15:41:32 -0700 |
commit | 05ca3632e5a73b493b27ec3e2a337885563abff0 (patch) | |
tree | cfec80454ff027e6fa58ab688b7f7b9c3ba385b6 /fs/f2fs/node.c | |
parent | 01b960e94a58d91518d5dd7001c5cd0c57335251 (diff) | |
download | linux-05ca3632e5a73b493b27ec3e2a337885563abff0.tar.bz2 |
f2fs: add sbi and page pointer in f2fs_io_info
This patch adds f2fs_sb_info and page pointers in f2fs_io_info structure.
With this change, we can reduce a lot of parameters for IO functions.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 1676c7a454b2..880d5781b1b3 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -995,8 +995,10 @@ static int read_node_page(struct page *page, int rw) struct f2fs_sb_info *sbi = F2FS_P_SB(page); struct node_info ni; struct f2fs_io_info fio = { + .sbi = sbi, .type = NODE, .rw = rw, + .page = page, }; get_node_info(sbi, page->index, &ni); @@ -1011,7 +1013,7 @@ static int read_node_page(struct page *page, int rw) return LOCKED_PAGE; fio.blk_addr = ni.blk_addr; - return f2fs_submit_page_bio(sbi, page, &fio); + return f2fs_submit_page_bio(&fio); } /* @@ -1293,8 +1295,10 @@ static int f2fs_write_node_page(struct page *page, nid_t nid; struct node_info ni; struct f2fs_io_info fio = { + .sbi = sbi, .type = NODE, .rw = (wbc->sync_mode == WB_SYNC_ALL) ? WRITE_SYNC : WRITE, + .page = page, }; trace_f2fs_writepage(page, NODE); @@ -1329,7 +1333,7 @@ static int f2fs_write_node_page(struct page *page, set_page_writeback(page); fio.blk_addr = ni.blk_addr; - write_node_page(sbi, page, nid, &fio); + write_node_page(nid, &fio); set_node_addr(sbi, &ni, fio.blk_addr, is_fsync_dnode(page)); dec_page_count(sbi, F2FS_DIRTY_NODES); up_read(&sbi->node_write); |