diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-11-28 10:28:37 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-11-28 11:16:25 +0300 |
commit | a742fd41c02c34e0b1b39ee366eb4982837439df (patch) | |
tree | e7af2864ebccd38e8148e63fdf0878a6b856a78d | |
parent | f4f0b6777db4e7a4ba4f713d1d68f8e8f0ef421a (diff) | |
download | linux-a742fd41c02c34e0b1b39ee366eb4982837439df.tar.xz |
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>
-rw-r--r-- | fs/f2fs/f2fs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index c28a9d1cb278..aa500239baf2 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -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); |