diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-12-28 08:09:44 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-01-02 19:27:31 -0800 |
commit | 0a007b97aad6e1700ef5c3815d14e88192cc1124 (patch) | |
tree | 8c21d92988c5fa3fbf253a7c0792ac2cbc26f237 /fs/f2fs/file.c | |
parent | c39a1b348c4fe172729eff77c533dabc3c7cdaa7 (diff) | |
download | op-kernel-dev-0a007b97aad6e1700ef5c3815d14e88192cc1124.zip op-kernel-dev-0a007b97aad6e1700ef5c3815d14e88192cc1124.tar.gz |
f2fs: recover directory operations by fsync
This fixes generic/342 which doesn't recover renamed file which was fsynced
before. It will be done via another fsync on newly created file.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 1db68f1..322aab9 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -165,6 +165,9 @@ static inline enum cp_reason_type need_do_checkpoint(struct inode *inode) cp_reason = CP_FASTBOOT_MODE; else if (sbi->active_logs == 2) cp_reason = CP_SPEC_LOG_NUM; + else if (need_dentry_mark(sbi, inode->i_ino) && + exist_written_data(sbi, F2FS_I(inode)->i_pino, TRANS_DIR_INO)) + cp_reason = CP_RECOVER_DIR; return cp_reason; } |