linux/fs/f2fs
Jaegeuk Kim 699489bbbe 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>
2013-06-12 08:18:35 +09:00
..
acl.c f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
acl.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
checkpoint.c f2fs: fix iget/iput of dir during recovery 2013-06-07 13:21:37 +09:00
data.c f2fs: sync dir->i_size with its block allocation 2013-06-12 08:18:35 +09:00
debug.c f2fs: use list_for_each_entry rather than list_for_each_entry_safe 2013-05-28 15:03:02 +09:00
dir.c f2fs: sync dir->i_size with its block allocation 2013-06-12 08:18:35 +09:00
f2fs.h f2fs: sync dir->i_size with its block allocation 2013-06-12 08:18:35 +09:00
file.c f2fs: fix i_blocks translation on various types of files 2013-06-11 16:01:09 +09:00
gc.c f2fs: reorganise the function get_victim_by_default 2013-06-06 14:20:46 +09:00
gc.h f2fs: avoid frequent background GC 2013-04-26 10:35:03 +09:00
hash.c f2fs: unify string length declarations and usage 2012-12-28 11:27:53 +09:00
inode.c f2fs: fix wrong condition check 2013-05-28 15:03:03 +09:00
Kconfig f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
Makefile f2fs: update Kconfig and Makefile 2012-12-11 13:43:42 +09:00
namei.c f2fs: fix i_blocks translation on various types of files 2013-06-11 16:01:09 +09:00
node.c f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
node.h f2fs: optimize several routines in node.h 2013-05-28 15:03:05 +09:00
recovery.c f2fs: fix iget/iput of dir during recovery 2013-06-07 13:21:37 +09:00
segment.c f2fs: push some variables to debug part 2013-05-28 15:03:05 +09:00
segment.h f2fs: modify the number of issued pages to merge IOs 2013-04-30 12:07:32 +09:00
super.c f2fs: set sb->s_fs_info before calling parse_options() 2013-06-11 16:01:08 +09:00
xattr.c f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00
xattr.h f2fs: support xattr security labels 2013-06-11 16:01:03 +09:00