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

Commit 06f722a0 authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: avoid frequent costly fsck triggers



If we want to re-enable nat_bits, we rely on fsck which requires full scan
of directory tree. Let's do that by regular fsck or unclean shutdown.

Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 2f3fdac2
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1621,7 +1621,11 @@ static inline void disable_nat_bits(struct f2fs_sb_info *sbi, bool lock)
{
	unsigned long flags;

	set_sbi_flag(sbi, SBI_NEED_FSCK);
	/*
	 * In order to re-enable nat_bits we need to call fsck.f2fs by
	 * set_sbi_flag(sbi, SBI_NEED_FSCK). But it may give huge cost,
	 * so let's rely on regular fsck or unclean shutdown.
	 */

	if (lock)
		spin_lock_irqsave(&sbi->cp_lock, flags);