Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7230d16 authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: check end_io for metapages before making next checkpoint blocks



This patch avoids to produce new checkpoint blocks before the previous meta
pages were written completely.

Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 569cf187
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1000,6 +1000,11 @@ static void do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)

	start_blk = __start_cp_addr(sbi);

	/* need to wait for end_io results */
	wait_on_all_pages_writeback(sbi);
	if (unlikely(f2fs_cp_error(sbi)))
		return;

	/* write out checkpoint buffer at block 0 */
	update_meta_page(sbi, ckpt, start_blk++);