f2fs: add roll-forward recovery process for encrypted dentry

Add roll-forward recovery process for encrypted dentry, so the first fsync
issued to an encrypted file does not need writing checkpoint.

This improves the performance of the following test at thousands of small
files: open -> write -> fsync -> close

Signed-off-by: Shuoran Liu <liushuoran@huawei.com>
Acked-by: Chao Yu <yuchao0@huawei.com>
[Jaegeuk Kim: modify kernel message to show encrypted names]
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
Shuoran Liu
2016-08-29 11:27:56 +08:00
committed by Jaegeuk Kim
parent bbf156f7af
commit e7ba108a06
4 changed files with 66 additions and 42 deletions

View File

@@ -137,8 +137,6 @@ static inline bool need_do_checkpoint(struct inode *inode)
need_cp = true;
else if (is_sbi_flag_set(sbi, SBI_NEED_CP))
need_cp = true;
else if (file_enc_name(inode) && need_dentry_mark(sbi, inode->i_ino))
need_cp = true;
else if (file_wrong_pino(inode))
need_cp = true;
else if (!space_for_roll_forward(sbi))