Loading fs/f2fs/checkpoint.c +1 −1 Original line number Diff line number Diff line Loading @@ -1017,7 +1017,7 @@ static int block_operations(struct f2fs_sb_info *sbi) if (get_pages(sbi, F2FS_DIRTY_NODES)) { up_write(&sbi->node_write); err = sync_node_pages(sbi, &wbc); err = sync_node_pages(sbi, &wbc, false); if (err) { up_write(&sbi->node_change); f2fs_unlock_all(sbi); Loading fs/f2fs/f2fs.h +2 −1 Original line number Diff line number Diff line Loading @@ -2390,7 +2390,8 @@ struct page *get_node_page_ra(struct page *parent, int start); void move_node_page(struct page *node_page, int gc_type); int fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode, struct writeback_control *wbc, bool atomic); int sync_node_pages(struct f2fs_sb_info *sbi, struct writeback_control *wbc); int sync_node_pages(struct f2fs_sb_info *sbi, struct writeback_control *wbc, bool do_balance); void build_free_nids(struct f2fs_sb_info *sbi, bool sync, bool mount); bool alloc_nid(struct f2fs_sb_info *sbi, nid_t *nid); void alloc_nid_done(struct f2fs_sb_info *sbi, nid_t nid); Loading fs/f2fs/node.c +10 −6 Original line number Diff line number Diff line Loading @@ -1327,7 +1327,7 @@ static struct page *last_fsync_dnode(struct f2fs_sb_info *sbi, nid_t ino) } static int __write_node_page(struct page *page, bool atomic, bool *submitted, struct writeback_control *wbc) struct writeback_control *wbc, bool do_balance) { struct f2fs_sb_info *sbi = F2FS_P_SB(page); nid_t nid; Loading Loading @@ -1396,6 +1396,8 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted, if (submitted) *submitted = fio.submitted; if (do_balance) f2fs_balance_fs(sbi, false); return 0; redirty_out: Loading @@ -1406,7 +1408,7 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted, static int f2fs_write_node_page(struct page *page, struct writeback_control *wbc) { return __write_node_page(page, false, NULL, wbc); return __write_node_page(page, false, NULL, wbc, false); } int fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode, Loading Loading @@ -1494,7 +1496,7 @@ int fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode, ret = __write_node_page(page, atomic && page == last_page, &submitted, wbc); &submitted, wbc, true); if (ret) { unlock_page(page); f2fs_put_page(last_page, 0); Loading Loading @@ -1531,7 +1533,8 @@ int fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode, return ret ? -EIO: 0; } int sync_node_pages(struct f2fs_sb_info *sbi, struct writeback_control *wbc) int sync_node_pages(struct f2fs_sb_info *sbi, struct writeback_control *wbc, bool do_balance) { pgoff_t index, end; struct pagevec pvec; Loading Loading @@ -1609,7 +1612,8 @@ int sync_node_pages(struct f2fs_sb_info *sbi, struct writeback_control *wbc) set_fsync_mark(page, 0); set_dentry_mark(page, 0); ret = __write_node_page(page, false, &submitted, wbc); ret = __write_node_page(page, false, &submitted, wbc, do_balance); if (ret) unlock_page(page); else if (submitted) Loading Loading @@ -1698,7 +1702,7 @@ static int f2fs_write_node_pages(struct address_space *mapping, diff = nr_pages_to_write(sbi, NODE, wbc); wbc->sync_mode = WB_SYNC_NONE; blk_start_plug(&plug); sync_node_pages(sbi, wbc); sync_node_pages(sbi, wbc, true); blk_finish_plug(&plug); wbc->nr_to_write = max((long)0, wbc->nr_to_write - diff); return 0; Loading Loading
fs/f2fs/checkpoint.c +1 −1 Original line number Diff line number Diff line Loading @@ -1017,7 +1017,7 @@ static int block_operations(struct f2fs_sb_info *sbi) if (get_pages(sbi, F2FS_DIRTY_NODES)) { up_write(&sbi->node_write); err = sync_node_pages(sbi, &wbc); err = sync_node_pages(sbi, &wbc, false); if (err) { up_write(&sbi->node_change); f2fs_unlock_all(sbi); Loading
fs/f2fs/f2fs.h +2 −1 Original line number Diff line number Diff line Loading @@ -2390,7 +2390,8 @@ struct page *get_node_page_ra(struct page *parent, int start); void move_node_page(struct page *node_page, int gc_type); int fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode, struct writeback_control *wbc, bool atomic); int sync_node_pages(struct f2fs_sb_info *sbi, struct writeback_control *wbc); int sync_node_pages(struct f2fs_sb_info *sbi, struct writeback_control *wbc, bool do_balance); void build_free_nids(struct f2fs_sb_info *sbi, bool sync, bool mount); bool alloc_nid(struct f2fs_sb_info *sbi, nid_t *nid); void alloc_nid_done(struct f2fs_sb_info *sbi, nid_t nid); Loading
fs/f2fs/node.c +10 −6 Original line number Diff line number Diff line Loading @@ -1327,7 +1327,7 @@ static struct page *last_fsync_dnode(struct f2fs_sb_info *sbi, nid_t ino) } static int __write_node_page(struct page *page, bool atomic, bool *submitted, struct writeback_control *wbc) struct writeback_control *wbc, bool do_balance) { struct f2fs_sb_info *sbi = F2FS_P_SB(page); nid_t nid; Loading Loading @@ -1396,6 +1396,8 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted, if (submitted) *submitted = fio.submitted; if (do_balance) f2fs_balance_fs(sbi, false); return 0; redirty_out: Loading @@ -1406,7 +1408,7 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted, static int f2fs_write_node_page(struct page *page, struct writeback_control *wbc) { return __write_node_page(page, false, NULL, wbc); return __write_node_page(page, false, NULL, wbc, false); } int fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode, Loading Loading @@ -1494,7 +1496,7 @@ int fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode, ret = __write_node_page(page, atomic && page == last_page, &submitted, wbc); &submitted, wbc, true); if (ret) { unlock_page(page); f2fs_put_page(last_page, 0); Loading Loading @@ -1531,7 +1533,8 @@ int fsync_node_pages(struct f2fs_sb_info *sbi, struct inode *inode, return ret ? -EIO: 0; } int sync_node_pages(struct f2fs_sb_info *sbi, struct writeback_control *wbc) int sync_node_pages(struct f2fs_sb_info *sbi, struct writeback_control *wbc, bool do_balance) { pgoff_t index, end; struct pagevec pvec; Loading Loading @@ -1609,7 +1612,8 @@ int sync_node_pages(struct f2fs_sb_info *sbi, struct writeback_control *wbc) set_fsync_mark(page, 0); set_dentry_mark(page, 0); ret = __write_node_page(page, false, &submitted, wbc); ret = __write_node_page(page, false, &submitted, wbc, do_balance); if (ret) unlock_page(page); else if (submitted) Loading Loading @@ -1698,7 +1702,7 @@ static int f2fs_write_node_pages(struct address_space *mapping, diff = nr_pages_to_write(sbi, NODE, wbc); wbc->sync_mode = WB_SYNC_NONE; blk_start_plug(&plug); sync_node_pages(sbi, wbc); sync_node_pages(sbi, wbc, true); blk_finish_plug(&plug); wbc->nr_to_write = max((long)0, wbc->nr_to_write - diff); return 0; Loading