diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-09-02 18:52:58 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-09-09 16:15:02 -0400 |
commit | 9850cf4a8908886370b1f15aacf83d291f098c72 (patch) | |
tree | 2ee332a189922cefd47e26ce335cab7ad21e96b2 /fs/f2fs/recovery.c | |
parent | 2ae4c673e3cbd69bc2decf6d7f5961f3c7b9b38b (diff) |
f2fs: need fsck.f2fs when f2fs_bug_on is triggered
If any f2fs_bug_on is triggered, fsck.f2fs is needed.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/recovery.c')
-rw-r--r-- | fs/f2fs/recovery.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 5c095f7ac21c..6c5a74a45f33 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c | |||
@@ -331,8 +331,8 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode, | |||
331 | f2fs_wait_on_page_writeback(dn.node_page, NODE); | 331 | f2fs_wait_on_page_writeback(dn.node_page, NODE); |
332 | 332 | ||
333 | get_node_info(sbi, dn.nid, &ni); | 333 | get_node_info(sbi, dn.nid, &ni); |
334 | f2fs_bug_on(ni.ino != ino_of_node(page)); | 334 | f2fs_bug_on(sbi, ni.ino != ino_of_node(page)); |
335 | f2fs_bug_on(ofs_of_node(dn.node_page) != ofs_of_node(page)); | 335 | f2fs_bug_on(sbi, ofs_of_node(dn.node_page) != ofs_of_node(page)); |
336 | 336 | ||
337 | for (; start < end; start++) { | 337 | for (; start < end; start++) { |
338 | block_t src, dest; | 338 | block_t src, dest; |
@@ -344,7 +344,7 @@ static int do_recover_data(struct f2fs_sb_info *sbi, struct inode *inode, | |||
344 | if (src == NULL_ADDR) { | 344 | if (src == NULL_ADDR) { |
345 | err = reserve_new_block(&dn); | 345 | err = reserve_new_block(&dn); |
346 | /* We should not get -ENOSPC */ | 346 | /* We should not get -ENOSPC */ |
347 | f2fs_bug_on(err); | 347 | f2fs_bug_on(sbi, err); |
348 | } | 348 | } |
349 | 349 | ||
350 | /* Check the previous node page having this index */ | 350 | /* Check the previous node page having this index */ |
@@ -474,7 +474,7 @@ int recover_fsync_data(struct f2fs_sb_info *sbi) | |||
474 | /* step #2: recover data */ | 474 | /* step #2: recover data */ |
475 | err = recover_data(sbi, &inode_list, CURSEG_WARM_NODE); | 475 | err = recover_data(sbi, &inode_list, CURSEG_WARM_NODE); |
476 | if (!err) | 476 | if (!err) |
477 | f2fs_bug_on(!list_empty(&inode_list)); | 477 | f2fs_bug_on(sbi, !list_empty(&inode_list)); |
478 | out: | 478 | out: |
479 | destroy_fsync_dnodes(&inode_list); | 479 | destroy_fsync_dnodes(&inode_list); |
480 | kmem_cache_destroy(fsync_entry_slab); | 480 | kmem_cache_destroy(fsync_entry_slab); |