summaryrefslogtreecommitdiff
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-02-03 12:24:51 +0400
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-02-17 09:58:52 +0400
commit924a2ddbd0c2829ebca9ac899522cbb16a9b6d8c (patch)
tree794457d4b817008f58a274231a4d6418e66923b0 /fs/f2fs/recovery.c
parent1b1f559fc362f96869b7e04ef9825b1039b9a67d (diff)
downloadlinux-924a2ddbd0c2829ebca9ac899522cbb16a9b6d8c.tar.xz
f2fs: fix the potential mismatch between dir's i_size and i_blocks
This is the erroneous scenario. i_size on-disk i_size i_blocks __f2fs_add_link() 4096 4096 2 get_new_data_page 8192 4096 3 -ENOSPC = init_inode_metadata checkpoint - 4096 3 POR and reboot __f2fs_add_link() 4096 4096 3 page = get_new_data_page (page->index = 1 by NEW_ADDR) add a dentry to the page successfully f2fs_rmdir() f2fs_empty_dir() 4096 4096 3 f2fs_unlink() goes, since there is no valid dentry due to i_size = 4096. But, still there is one dentry in page->index = 1. So this patch moves the code to write dir->i_size into on-disk i_size in order to sync dir's i_size, on-disk i_size, and its i_blocks. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/recovery.c')
0 files changed, 0 insertions, 0 deletions