Loading fs/f2fs/gc.c +10 −0 Original line number Diff line number Diff line Loading @@ -396,14 +396,18 @@ static void gc_node_segment(struct f2fs_sb_info *sbi, { bool initial = true; struct f2fs_summary *entry; block_t start_addr; int off; start_addr = START_BLOCK(sbi, segno); next_step: entry = sum; for (off = 0; off < sbi->blocks_per_seg; off++, entry++) { nid_t nid = le32_to_cpu(entry->nid); struct page *node_page; struct node_info ni; /* stop BG_GC if there is not enough free sections. */ if (gc_type == BG_GC && has_not_enough_free_secs(sbi, 0)) Loading @@ -426,6 +430,12 @@ static void gc_node_segment(struct f2fs_sb_info *sbi, continue; } get_node_info(sbi, nid, &ni); if (ni.blk_addr != start_addr + off) { f2fs_put_page(node_page, 1); continue; } /* set page dirty and write it */ if (gc_type == FG_GC) { f2fs_wait_on_page_writeback(node_page, NODE); Loading Loading
fs/f2fs/gc.c +10 −0 Original line number Diff line number Diff line Loading @@ -396,14 +396,18 @@ static void gc_node_segment(struct f2fs_sb_info *sbi, { bool initial = true; struct f2fs_summary *entry; block_t start_addr; int off; start_addr = START_BLOCK(sbi, segno); next_step: entry = sum; for (off = 0; off < sbi->blocks_per_seg; off++, entry++) { nid_t nid = le32_to_cpu(entry->nid); struct page *node_page; struct node_info ni; /* stop BG_GC if there is not enough free sections. */ if (gc_type == BG_GC && has_not_enough_free_secs(sbi, 0)) Loading @@ -426,6 +430,12 @@ static void gc_node_segment(struct f2fs_sb_info *sbi, continue; } get_node_info(sbi, nid, &ni); if (ni.blk_addr != start_addr + off) { f2fs_put_page(node_page, 1); continue; } /* set page dirty and write it */ if (gc_type == FG_GC) { f2fs_wait_on_page_writeback(node_page, NODE); Loading