linux-stable/fs/f2fs
Jaegeuk Kim 44a83ff6a8 f2fs: update inode page after creation
I found a bug when testing power-off-recovery as follows.

[Bug Scenario]
1. create a file
2. fsync the file
3. reboot w/o any sync
4. try to recover the file
 - found its fsync mark
 - found its dentry mark
   : try to recover its dentry
    - get its file name
    - get its parent inode number
     : here we got zero value

The reason why we get the wrong parent inode number is that we didn't
synchronize the inode page with its newly created inode information perfectly.

Especially, previous f2fs stores fi->i_pino and writes it to the cached
node page in a wrong order, which incurs the zero-valued i_pino during the
recovery.

So, this patch modifies the creation flow to fix the synchronization order of
inode page with its inode.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
2013-05-28 15:03:02 +09:00
..
acl.c mode_t, whack-a-mole at 11... 2013-04-09 14:13:05 -04:00
acl.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00
checkpoint.c f2fs: fix BUG_ON during f2fs_evict_inode(dir) 2013-05-28 15:03:01 +09:00
data.c f2fs: update inode page after creation 2013-05-28 15:03:02 +09:00
debug.c f2fs: remove useless #include <linux/proc_fs.h> as we're now using sysfs as debug entry. 2013-04-30 12:07:32 +09:00
dir.c f2fs: update inode page after creation 2013-05-28 15:03:02 +09:00
f2fs.h f2fs: update inode page after creation 2013-05-28 15:03:02 +09:00
file.c f2fs: change get_new_data_page to pass a locked node page 2013-05-28 15:03:01 +09:00
gc.c f2fs: remove useless #include <linux/proc_fs.h> as we're now using sysfs as debug entry. 2013-04-30 12:07:32 +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: add tracepoints for sync & inode operations 2013-04-23 15:30:27 +09:00
Kconfig f2fs: resolve build failures 2012-12-11 13:43:43 +09:00
Makefile f2fs: update Kconfig and Makefile 2012-12-11 13:43:42 +09:00
namei.c f2fs: remove unnecessary por_doing check 2013-05-28 15:03:01 +09:00
node.c f2fs: update inode page after creation 2013-05-28 15:03:02 +09:00
node.h f2fs: fix the logic of IS_DNODE() 2013-04-09 18:21:24 +09:00
recovery.c f2fs: fix BUG_ON during f2fs_evict_inode(dir) 2013-05-28 15:03:01 +09:00
segment.c f2fs: modify the number of issued pages to merge IOs 2013-04-30 12:07:32 +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 updates for v3.10 2013-05-08 15:11:48 -07:00
xattr.c f2fs: introduce a new global lock scheme 2013-04-09 18:21:18 +09:00
xattr.h f2fs: adjust kernel coding style 2012-12-11 13:43:42 +09:00