f2fs: fix inconsistency between xattr node blocks and its inode
authorJaegeuk Kim <jaegeuk.kim@samsung.com>
Fri, 9 Aug 2013 05:46:15 +0000 (14:46 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Fri, 9 Aug 2013 06:25:24 +0000 (15:25 +0900)
commite518ff81c337e39b9b63d92ba41e4512521d7c9c
tree9e576b0984e21e4ab3a4515bab29864d63fbcf01
parentdbe6a5ff4fa78bdfa983458c338831d91b35f315
f2fs: fix inconsistency between xattr node blocks and its inode

Previously xattr node blocks are stored to the COLD_NODE log, which means that
our roll-forward mechanism doesn't recover the xattr node blocks at all.
Only the direct node blocks in the WARM_NODE log can be recovered.

So, let's resolve the issue simply by conducting checkpoint during fsync when a
file has a modified xattr node block.

This approach is able to degrade the performance, but normally the checkpoint
overhead is shown at the initial fsync call after the xattr entry changes.
Once the checkpoint is done, no additional overhead would be occurred.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/xattr.c