]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: fix lost xattrs of directories
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 30 Aug 2016 01:23:45 +0000 (18:23 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 8 Sep 2016 00:27:39 +0000 (17:27 -0700)
commita6c4a66bbd516b578f3a40c0e104fc608501d970
treeaff5602ad821fcfeea2bd4cd3eb35017f101e7d9
parentb64c2e70d1b3b6cdc875e3ff29f82f9e628529eb
f2fs: fix lost xattrs of directories

This patch enhances the xattr consistency of dirs from suddern power-cuts.

Possible scenario would be:
1. dir->setxattr used by per-file encryption
2. file->setxattr goes into inline_xattr
3. file->fsync

In that case, we should do checkpoint for #1.
Otherwise we'd lose dir's key information for the file given #2.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/xattr.c