From: Jaegeuk Kim <jaegeuk@kernel.org> To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim <jaegeuk@kernel.org> Subject: [PATCH 3/4] f2fs: avoid gc in cp_error case Date: Wed, 21 Sep 2016 20:54:57 -0700 [thread overview] Message-ID: <20160922035458.5002-3-jaegeuk@kernel.org> (raw) In-Reply-To: <20160922035458.5002-1-jaegeuk@kernel.org> Otherwise, we can hit f2fs_bug_on(sbi, !PageUptodate(sum_page)); Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> --- fs/f2fs/gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index a9a3c9f..b9d6c42 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -847,7 +847,8 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi, for (segno = start_segno; segno < end_segno; segno++) { - if (get_valid_blocks(sbi, segno, 1) == 0) + if (get_valid_blocks(sbi, segno, 1) == 0 || + unlikely(f2fs_cp_error(sbi))) goto next; /* find segment summary of victim */ -- 2.8.3
WARNING: multiple messages have this Message-ID (diff)
From: Jaegeuk Kim <jaegeuk@kernel.org> To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim <jaegeuk@kernel.org> Subject: [PATCH 3/4] f2fs: avoid gc in cp_error case Date: Wed, 21 Sep 2016 20:54:57 -0700 [thread overview] Message-ID: <20160922035458.5002-3-jaegeuk@kernel.org> (raw) In-Reply-To: <20160922035458.5002-1-jaegeuk@kernel.org> Otherwise, we can hit f2fs_bug_on(sbi, !PageUptodate(sum_page)); Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> --- fs/f2fs/gc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index a9a3c9f..b9d6c42 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -847,7 +847,8 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi, for (segno = start_segno; segno < end_segno; segno++) { - if (get_valid_blocks(sbi, segno, 1) == 0) + if (get_valid_blocks(sbi, segno, 1) == 0 || + unlikely(f2fs_cp_error(sbi))) goto next; /* find segment summary of victim */ -- 2.8.3 ------------------------------------------------------------------------------
next prev parent reply other threads:[~2016-09-22 3:56 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-09-22 3:54 [PATCH 1/4] f2fs: assign return value in f2fs_gc Jaegeuk Kim 2016-09-22 3:54 ` Jaegeuk Kim 2016-09-22 3:54 ` [PATCH 2/4] f2fs: should put_page for summary page Jaegeuk Kim 2016-09-22 3:54 ` Jaegeuk Kim [this message] 2016-09-22 3:54 ` [PATCH 3/4] f2fs: avoid gc in cp_error case Jaegeuk Kim 2016-09-22 3:54 ` [PATCH 4/4] f2fs: handle errors during recover_orphan_inodes Jaegeuk Kim 2016-09-22 3:54 ` Jaegeuk Kim 2016-09-22 10:58 ` [f2fs-dev] [PATCH 1/4] f2fs: assign return value in f2fs_gc Chao Yu 2016-09-22 10:58 ` Chao Yu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20160922035458.5002-3-jaegeuk@kernel.org \ --to=jaegeuk@kernel.org \ --cc=linux-f2fs-devel@lists.sourceforge.net \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.