projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[firefly-linux-kernel-4.4.55.git]
/
fs
/
f2fs
/
recovery.c
diff --git
a/fs/f2fs/recovery.c
b/fs/f2fs/recovery.c
index 9160a37e1c7a4084e858d6ddb033946667a5ed17..41afb9534bbdcb66a20ea6650fc71f62a8b99034 100644
(file)
--- a/
fs/f2fs/recovery.c
+++ b/
fs/f2fs/recovery.c
@@
-346,6
+346,10
@@
static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
if (IS_INODE(page)) {
recover_inline_xattr(inode, page);
} else if (f2fs_has_xattr_block(ofs_of_node(page))) {
if (IS_INODE(page)) {
recover_inline_xattr(inode, page);
} else if (f2fs_has_xattr_block(ofs_of_node(page))) {
+ /*
+ * Deprecated; xattr blocks should be found from cold log.
+ * But, we should remain this for backward compatibility.
+ */
recover_xattr_data(inode, page, blkaddr);
goto out;
}
recover_xattr_data(inode, page, blkaddr);
goto out;
}
@@
-396,7
+400,8
@@
static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
/* write dummy data page */
recover_data_page(sbi, NULL, &sum, src, dest);
/* write dummy data page */
recover_data_page(sbi, NULL, &sum, src, dest);
- update_extent_cache(dest, &dn);
+ dn.data_blkaddr = dest;
+ update_extent_cache(&dn);
recovered++;
}
dn.ofs_in_node++;
recovered++;
}
dn.ofs_in_node++;
@@
-503,7
+508,7
@@
int recover_fsync_data(struct f2fs_sb_info *sbi)
INIT_LIST_HEAD(&inode_list);
/* step #1: find fsynced inode numbers */
INIT_LIST_HEAD(&inode_list);
/* step #1: find fsynced inode numbers */
- s
bi->por_doing = true
;
+ s
et_sbi_flag(sbi, SBI_POR_DOING)
;
/* prevent checkpoint */
mutex_lock(&sbi->cp_mutex);
/* prevent checkpoint */
mutex_lock(&sbi->cp_mutex);
@@
-536,7
+541,7
@@
out:
truncate_inode_pages_final(META_MAPPING(sbi));
}
truncate_inode_pages_final(META_MAPPING(sbi));
}
-
sbi->por_doing = false
;
+
clear_sbi_flag(sbi, SBI_POR_DOING)
;
if (err) {
discard_next_dnode(sbi, blkaddr);
if (err) {
discard_next_dnode(sbi, blkaddr);