]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/f2fs/dir.c
f2fs: cleanup the disk level filename updating
authorKinglong Mee <kinglongmee@gmail.com>
Fri, 10 Mar 2017 08:28:46 +0000 (16:28 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 22 Mar 2017 02:34:33 +0000 (22:34 -0400)
commitd03ba4cc3fa639916a86b61c5a3d817cb6aa91a0
tree65d15f6dbdaf2f527e8ae3fce3947317c0afb137
parent346fe752c431bcef5d05614263a4b4a0cfe88e10
f2fs: cleanup the disk level filename updating

As discuss with Jaegeuk and Chao,
"Once checkpoint is done, f2fs doesn't need to update there-in filename at all."

The disk-level filename is used only one case,
1. create a file A under a dir
2. sync A
3. godown
4. umount
5. mount (roll_forward)

Only the rename/cross_rename changes the filename, if it happens,
a. between step 1 and 2, the sync A will caused checkpoint, so that,
   the roll_forward at step 5 never happens.
b. after step 2, the roll_forward happens, file A will roll forward
   to the result as after step 1.

So that, any updating the disk filename is useless, just cleanup it.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/dir.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/inline.c
fs/f2fs/namei.c