f2fs: fix to recover inline_xattr/data and blocks
This patch fixes not to skip xattr recovery and inline xattr/data recovery order. Reviewed-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -302,14 +302,19 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
|
||||
struct node_info ni;
|
||||
int err = 0, recovered = 0;
|
||||
|
||||
recover_inline_xattr(inode, page);
|
||||
/* step 1: recover xattr */
|
||||
if (IS_INODE(page)) {
|
||||
recover_inline_xattr(inode, page);
|
||||
} else if (f2fs_has_xattr_block(ofs_of_node(page))) {
|
||||
recover_xattr_data(inode, page, blkaddr);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* step 2: recover inline data */
|
||||
if (recover_inline_data(inode, page))
|
||||
goto out;
|
||||
|
||||
if (recover_xattr_data(inode, page, blkaddr))
|
||||
goto out;
|
||||
|
||||
/* step 3: recover data indices */
|
||||
start = start_bidx_of_node(ofs_of_node(page), fi);
|
||||
end = start + ADDRS_PER_PAGE(page, fi);
|
||||
|
||||
|
Reference in New Issue
Block a user