aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/checkpoint.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-07-25 18:47:25 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2014-07-30 17:13:35 -0400
commitcf2271e781cb16e1ca22be920010c2b64d90c338 (patch)
treee5326d4d03ed5b66359faf41a00b49416d180341 /fs/f2fs/checkpoint.c
parent61e0f2d0a5f2cddf7cd96fa8cb7fe53a1e5e325d (diff)
f2fs: avoid retrying wrong recovery routine when error was occurred
This patch eliminates the propagation of recovery errors to the next mount. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r--fs/f2fs/checkpoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 26b94bbc826c..cea20b810f44 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -796,6 +796,7 @@ static void wait_on_all_pages_writeback(struct f2fs_sb_info *sbi)
796static void do_checkpoint(struct f2fs_sb_info *sbi, bool is_umount) 796static void do_checkpoint(struct f2fs_sb_info *sbi, bool is_umount)
797{ 797{
798 struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi); 798 struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
799 struct curseg_info *curseg = CURSEG_I(sbi, CURSEG_WARM_NODE);
799 nid_t last_nid = 0; 800 nid_t last_nid = 0;
800 block_t start_blk; 801 block_t start_blk;
801 struct page *cp_page; 802 struct page *cp_page;
@@ -809,7 +810,7 @@ static void do_checkpoint(struct f2fs_sb_info *sbi, bool is_umount)
809 * This avoids to conduct wrong roll-forward operations and uses 810 * This avoids to conduct wrong roll-forward operations and uses
810 * metapages, so should be called prior to sync_meta_pages below. 811 * metapages, so should be called prior to sync_meta_pages below.
811 */ 812 */
812 discard_next_dnode(sbi); 813 discard_next_dnode(sbi, NEXT_FREE_BLKADDR(sbi, curseg));
813 814
814 /* Flush all the NAT/SIT pages */ 815 /* Flush all the NAT/SIT pages */
815 while (get_pages(sbi, F2FS_DIRTY_META)) 816 while (get_pages(sbi, F2FS_DIRTY_META))