summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-08-07 23:49:17 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2014-08-19 10:01:34 -0700
commit1c35a90e8ab57cd34b8e806b9c75ba05b3b5c7a3 (patch)
tree876d33439e04eaf67714f2818650e78024f36279 /fs/f2fs/recovery.c
parente3b4d43f7c233c6fce21fe4b4cb55b6d59afddae (diff)
downloadblackbird-op-linux-1c35a90e8ab57cd34b8e806b9c75ba05b3b5c7a3.tar.gz
blackbird-op-linux-1c35a90e8ab57cd34b8e806b9c75ba05b3b5c7a3.zip
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,
struct node_info ni;
int err = 0, recovered = 0;
- recover_inline_xattr(inode, page);
-
- if (recover_inline_data(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;
+ }
- if (recover_xattr_data(inode, page, blkaddr))
+ /* step 2: recover inline data */
+ if (recover_inline_data(inode, page))
goto out;
+ /* step 3: recover data indices */
start = start_bidx_of_node(ofs_of_node(page), fi);
end = start + ADDRS_PER_PAGE(page, fi);
OpenPOWER on IntegriCloud