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: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
1bfbe019b4
commit
a390614ee5
1 changed files with 5 additions and 1 deletions
|
@ -1686,7 +1686,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);
|
||||
|
|
Loading…
Add table
Reference in a new issue