From: Jaegeuk Kim Date: Tue, 14 May 2013 06:47:43 +0000 (+0900) Subject: f2fs: fix inconsistency of block count during recovery X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~81^2~55 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65e5cd0a151d53d3d79ef4d81783d1dbc01d4b61;p=pandora-kernel.git f2fs: fix inconsistency of block count during recovery Currently f2fs recovers the dentry of fsynced files. When power-off-recovery is conducted, this newly recovered inode should increase node block count as well as inode block count. This patch resolves this inconsistency that results in: 1. create a file 2. write data 3. fsync 4. reboot without sync 5. mount and recover the file 6. node block count is 1 and inode block count is 2 : fall into the inconsistent state 7. unlink the file : trigger the following BUG_ON ------------[ cut here ]------------ kernel BUG at /home/zeus/f2fs_test/src/fs/f2fs/f2fs.h:716! Call Trace: [] ? get_node_page+0x50/0x1a0 [f2fs] [] remove_inode_page+0x8c/0x100 [f2fs] [] ? f2fs_evict_inode+0x180/0x2d0 [f2fs] [] f2fs_evict_inode+0x1be/0x2d0 [f2fs] [] evict+0xa7/0x1a0 [] iput+0x105/0x190 [] d_kill+0xe0/0x120 [] dput+0xe7/0x1e0 [] __fput+0x19d/0x2d0 [] ____fput+0xe/0x10 [] task_work_run+0xb5/0xe0 [] do_notify_resume+0x71/0xb0 [] int_signal+0x12/0x17 Reported-and-Tested-by: Chris Fries Signed-off-by: Jaegeuk Kim --- Reading git-diff-tree failed