aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-08-08 02:49:17 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2014-08-19 13:01:34 -0400
commit1c35a90e8ab57cd34b8e806b9c75ba05b3b5c7a3 (patch)
tree876d33439e04eaf67714f2818650e78024f36279 /fs/f2fs/recovery.c
parente3b4d43f7c233c6fce21fe4b4cb55b6d59afddae (diff)
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>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r--fs/f2fs/recovery.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index cfb2aa9bfc20..d7b67b86f607 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -302,14 +302,19 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
302 struct node_info ni; 302 struct node_info ni;
303 int err = 0, recovered = 0; 303 int err = 0, recovered = 0;
304 304
305 recover_inline_xattr(inode, page); 305 /* step 1: recover xattr */
306 306 if (IS_INODE(page)) {
307 if (recover_inline_data(inode, page)) 307 recover_inline_xattr(inode, page);
308 } else if (f2fs_has_xattr_block(ofs_of_node(page))) {
309 recover_xattr_data(inode, page, blkaddr);
308 goto out; 310 goto out;
311 }
309 312
310 if (recover_xattr_data(inode, page, blkaddr)) 313 /* step 2: recover inline data */
314 if (recover_inline_data(inode, page))
311 goto out; 315 goto out;
312 316
317 /* step 3: recover data indices */
313 start = start_bidx_of_node(ofs_of_node(page), fi); 318 start = start_bidx_of_node(ofs_of_node(page), fi);
314 end = start + ADDRS_PER_PAGE(page, fi); 319 end = start + ADDRS_PER_PAGE(page, fi);
315 320