]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: alloc new nids for xattr block in recovery
authorYunlei He <heyunlei@huawei.com>
Tue, 18 Jul 2017 01:48:12 +0000 (09:48 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 27 Jul 2017 02:34:30 +0000 (19:34 -0700)
commitccb0bc95e1ee9bc8508a0fe6d6920e07687ce97a
tree253eee593f2970a466091901af3977813cd1738d
parent4f44e978e0211ae23f1cae7c2b1d4ba9ad76e8ba
f2fs: alloc new nids for xattr block in recovery

recovery file A: recovery file B:
-get_dnode_of_data
-alloc_nid
-recover_xattr_data
-set_node_addr(sbi, &ni, NEW_ADDR, false);
--->bug_on for nid has been used by file A

In recovery process, new allocated node blocks may "reuse" xattr block
nids, this patch alloc new nids for xattr blocks in recovery process to
avoid this problem.

Signed-off-by: Yunlei He <heyunlei@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/node.c