Jaegeuk Kim b2c0829912 f2fs: do checkpoint for the renamed inode
If an inode is renamed, it should be registered as file_lost_pino to conduct
checkpoint at f2fs_sync_file.
Otherwise, the inode cannot be recovered due to no dent_mark in the following
scenario.

Note that, this scenario is from xfstests/322.

1. create "a"
2. fsync "a"
3. rename "a" to "b"
4. fsync "b"
5. Sudden power-cut

After recovery is done, "b" should be seen.
However, the result shows "a", since the recovery procedure does not enter
recover_dentry due to no dent_mark.

The reason is like below.
- The nid of "a" is checkpointed during #2, f2fs_sync_file.
- The inode page for "b" produced by #3 is written without dent_mark by
sync_node_pages.

So, this patch fixes this bug by assinging file_lost_pino to the "a"'s inode.
If the pino is lost, f2fs_sync_file conducts checkpoint, and then recovers
the latest pino and its dentry information for further recovery.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2014-07-09 05:59:31 -07:00
..
2014-06-06 16:08:09 -07:00
2014-06-04 16:53:53 -07:00
2014-06-12 00:18:51 -04:00
2014-04-18 14:20:48 +02:00
2014-01-25 03:14:05 -05:00
2014-06-06 16:08:13 -07:00
2014-05-05 17:25:50 +10:00
2014-06-12 00:18:51 -04:00
2014-05-06 17:39:36 -04:00
2014-06-14 19:43:27 -05:00
2013-10-24 23:34:54 -04:00
2014-04-19 13:23:31 -07:00
2014-05-06 17:32:52 -04:00
2014-05-06 17:31:10 -04:00
2013-11-09 00:16:20 -05:00
2013-10-24 23:34:54 -04:00
2014-02-07 16:08:57 -08:00
2014-04-01 23:19:09 -04:00
2014-05-06 17:39:42 -04:00
2014-04-01 23:19:08 -04:00
2014-04-01 23:19:08 -04:00
2014-04-01 23:19:09 -04:00
2013-11-09 00:16:31 -05:00