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

Commit 54297cd0 authored by Sahitya Tummala's avatar Sahitya Tummala
Browse files

f2fs: relax the f2fs_bug_on() condition in do_checkpoint()



With CONFIG_F2FS_CHECK_FS enabled, this condition in
do_checkpoint() is triggering a panic.

f2fs_bug_on(sbi, get_pages(sbi, F2FS_DIRTY_META) &&
				!f2fs_cp_error(sbi));

Relax this condition to a warning as a temporary workaround,
which is same as what will be used in production builds,
where CONFIG_F2FS_CHECK_FS will not be enabled by default.

Change-Id: Idddc10be00d4d8fc6c4bc5989053563b12f9d451
Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
parent f8b00cea
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -1401,8 +1401,10 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)

	/* Flush all the NAT/SIT pages */
	f2fs_sync_meta_pages(sbi, META, LONG_MAX, FS_CP_META_IO);
	f2fs_bug_on(sbi, get_pages(sbi, F2FS_DIRTY_META) &&
					!f2fs_cp_error(sbi));
	if (get_pages(sbi, F2FS_DIRTY_META) && !f2fs_cp_error(sbi)) {
		WARN_ON(1);
		set_sbi_flag(sbi, SBI_NEED_FSCK);
	}

	/*
	 * modify checkpoint
@@ -1510,8 +1512,10 @@ static int do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)

	/* Here, we have one bio having CP pack except cp pack 2 page */
	f2fs_sync_meta_pages(sbi, META, LONG_MAX, FS_CP_META_IO);
	f2fs_bug_on(sbi, get_pages(sbi, F2FS_DIRTY_META) &&
					!f2fs_cp_error(sbi));
	if (get_pages(sbi, F2FS_DIRTY_META) && !f2fs_cp_error(sbi)) {
		WARN_ON(1);
		set_sbi_flag(sbi, SBI_NEED_FSCK);
	}

	/* wait for previous submitted meta pages writeback */
	f2fs_wait_on_all_pages_writeback(sbi);