Searched hist:"699489 bbbea4fc3b9b735d69941cf4fca91ce1d5" (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/fs/f2fs/ |
H A D | dir.c | diff 699489bbbea4fc3b9b735d69941cf4fca91ce1d5 Fri Jun 07 08:08:23 CDT 2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> f2fs: sync dir->i_size with its block allocation
If new dentry block is allocated and its i_size is updated, we should update its inode block together in order to sync i_size and its block allocation. Otherwise, we can loose additional dentry block due to the unconsistent i_size.
Errorneous Scenario -------------------
In the recovery routine, - recovery_dentry | - __f2fs_add_link | | - get_new_data_page | | | - i_size_write(new_i_size) | | | - mark_inode_dirty_sync(dir) | | - update_parent_metadata | | | - mark_inode_dirty(dir) | - write_checkpoint - sync_dirty_dir_inodes - filemap_flush(dentry_blocks) - f2fs_write_data_page - skip to write the last dentry block due to index < i_size
In the above flow, new_i_size is not updated to its inode block so that the last dentry block will be lost accordingly.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
|
H A D | data.c | diff 699489bbbea4fc3b9b735d69941cf4fca91ce1d5 Fri Jun 07 08:08:23 CDT 2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> f2fs: sync dir->i_size with its block allocation
If new dentry block is allocated and its i_size is updated, we should update its inode block together in order to sync i_size and its block allocation. Otherwise, we can loose additional dentry block due to the unconsistent i_size.
Errorneous Scenario -------------------
In the recovery routine, - recovery_dentry | - __f2fs_add_link | | - get_new_data_page | | | - i_size_write(new_i_size) | | | - mark_inode_dirty_sync(dir) | | - update_parent_metadata | | | - mark_inode_dirty(dir) | - write_checkpoint - sync_dirty_dir_inodes - filemap_flush(dentry_blocks) - f2fs_write_data_page - skip to write the last dentry block due to index < i_size
In the above flow, new_i_size is not updated to its inode block so that the last dentry block will be lost accordingly.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
|
H A D | f2fs.h | diff 699489bbbea4fc3b9b735d69941cf4fca91ce1d5 Fri Jun 07 08:08:23 CDT 2013 Jaegeuk Kim <jaegeuk.kim@samsung.com> f2fs: sync dir->i_size with its block allocation
If new dentry block is allocated and its i_size is updated, we should update its inode block together in order to sync i_size and its block allocation. Otherwise, we can loose additional dentry block due to the unconsistent i_size.
Errorneous Scenario -------------------
In the recovery routine, - recovery_dentry | - __f2fs_add_link | | - get_new_data_page | | | - i_size_write(new_i_size) | | | - mark_inode_dirty_sync(dir) | | - update_parent_metadata | | | - mark_inode_dirty(dir) | - write_checkpoint - sync_dirty_dir_inodes - filemap_flush(dentry_blocks) - f2fs_write_data_page - skip to write the last dentry block due to index < i_size
In the above flow, new_i_size is not updated to its inode block so that the last dentry block will be lost accordingly.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
|