summaryrefslogtreecommitdiff
path: root/fs/f2fs/recovery.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-05 19:22:07 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-05 19:22:07 (GMT)
commit0fcb9d21b4e18ede3727b8905e74acd0d1daef56 (patch)
treef8181c110c8bed5b6322122ba086f34bbfb269f9 /fs/f2fs/recovery.c
parentd000f8d67f2bb464c9cf4fb5103f78d8cb406c05 (diff)
parentbeaa57dd986d4f398728c060692fc2452895cfd8 (diff)
downloadlinux-0fcb9d21b4e18ede3727b8905e74acd0d1daef56.tar.xz
Merge tag 'for-f2fs-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs
Pull f2fs updates from Jaegeuk Kim: "Most part of the patches include enhancing the stability and performance of in-memory extent caches feature. In addition, it introduces several new features and configurable points: - F2FS_GOING_DOWN_METAFLUSH ioctl to test power failures - F2FS_IOC_WRITE_CHECKPOINT ioctl to trigger checkpoint by users - background_gc=sync mount option to do gc synchronously - periodic checkpoints - sysfs entry to control readahead blocks for free nids And the following bug fixes have been merged. - fix SSA corruption by collapse/insert_range - correct a couple of gc behaviors - fix the results of f2fs_map_blocks - fix error case handling of volatile/atomic writes" * tag 'for-f2fs-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (54 commits) f2fs: fix to skip shrinking extent nodes f2fs: fix error path of ->symlink f2fs: fix to clear GCed flag for atomic written page f2fs: don't need to submit bio on error case f2fs: fix leakage of inmemory atomic pages f2fs: refactor __find_rev_next_{zero}_bit f2fs: support fiemap for inline_data f2fs: flush dirty data for bmap f2fs: relocate the tracepoint for background_gc f2fs crypto: fix racing of accessing encrypted page among f2fs: export ra_nid_pages to sysfs f2fs: readahead for free nids building f2fs: support lower priority asynchronous readahead in ra_meta_pages f2fs: don't tag REQ_META for temporary non-meta pages f2fs: add a tracepoint for f2fs_read_data_pages f2fs: set GFP_NOFS for grab_cache_page f2fs: fix SSA updates resulting in corruption Revert "f2fs: do not skip dentry block writes" f2fs: add F2FS_GOING_DOWN_METAFLUSH to test power-failure f2fs: merge meta writes as many possible ...
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r--fs/f2fs/recovery.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index faec2ca..cbf74f4 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -180,7 +180,7 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head)
curseg = CURSEG_I(sbi, CURSEG_WARM_NODE);
blkaddr = NEXT_FREE_BLKADDR(sbi, curseg);
- ra_meta_pages(sbi, blkaddr, 1, META_POR);
+ ra_meta_pages(sbi, blkaddr, 1, META_POR, true);
while (1) {
struct fsync_inode_entry *entry;
@@ -188,7 +188,7 @@ static int find_fsync_dnodes(struct f2fs_sb_info *sbi, struct list_head *head)
if (!is_valid_blkaddr(sbi, blkaddr, META_POR))
return 0;
- page = get_meta_page(sbi, blkaddr);
+ page = get_tmp_page(sbi, blkaddr);
if (cp_ver != cpver_of_node(page))
break;
@@ -383,15 +383,11 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
start = start_bidx_of_node(ofs_of_node(page), fi);
end = start + ADDRS_PER_PAGE(page, fi);
- f2fs_lock_op(sbi);
-
set_new_dnode(&dn, inode, NULL, NULL, 0);
err = get_dnode_of_data(&dn, start, ALLOC_NODE);
- if (err) {
- f2fs_unlock_op(sbi);
+ if (err)
goto out;
- }
f2fs_wait_on_page_writeback(dn.node_page, NODE);
@@ -456,7 +452,6 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode,
set_page_dirty(dn.node_page);
err:
f2fs_put_dnode(&dn);
- f2fs_unlock_op(sbi);
out:
f2fs_msg(sbi->sb, KERN_NOTICE,
"recover_data: ino = %lx, recovered = %d blocks, err = %d",
@@ -485,7 +480,7 @@ static int recover_data(struct f2fs_sb_info *sbi,
ra_meta_pages_cond(sbi, blkaddr);
- page = get_meta_page(sbi, blkaddr);
+ page = get_tmp_page(sbi, blkaddr);
if (cp_ver != cpver_of_node(page)) {
f2fs_put_page(page, 1);
@@ -570,7 +565,7 @@ out:
/* truncate meta pages to be used by the recovery */
truncate_inode_pages_range(META_MAPPING(sbi),
- MAIN_BLKADDR(sbi) << PAGE_CACHE_SHIFT, -1);
+ (loff_t)MAIN_BLKADDR(sbi) << PAGE_CACHE_SHIFT, -1);
if (err) {
truncate_inode_pages_final(NODE_MAPPING(sbi));