From: Chao Yu <chao@kernel.org>
To: Yongpeng Yang <yangyongpeng1@oppo.com>, Jaegeuk Kim <jaegeuk@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] f2fs: Add error handling for negative returns from do_garbage_collect
Date: Fri, 22 Dec 2023 17:42:26 +0800 [thread overview]
Message-ID: <e2b88b1d-7d76-4eed-9eea-f4cca188c2c2@kernel.org> (raw)
In-Reply-To: <20231222032901.3861649-2-yangyongpeng1@oppo.com>
On 2023/12/22 11:29, Yongpeng Yang wrote:
> The function do_garbage_collect can return a value less than 0 due
> to f2fs_cp_error being true or page allocation failure, as a result
> of calling f2fs_get_sum_page. However, f2fs_gc does not account for
> such cases, which could potentially lead to an abnormal total_freed
> and thus cause subsequent code to behave unexpectedly. Given that
> an f2fs_cp_error is irrecoverable, and considering that
> do_garbage_collect already retries page allocation errors through
> its call to f2fs_get_sum_page->f2fs_get_meta_page_retry, any error
> reported by do_garbage_collect should immediately terminate the
> current GC.
>
> Signed-off-by: Yongpeng Yang <yangyongpeng1@oppo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
next prev parent reply other threads:[~2023-12-22 9:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-22 3:29 [PATCH 1/2] f2fs: Constrain the modification range of dir_level in the sysfs Yongpeng Yang
2023-12-22 3:29 ` [PATCH 2/2] f2fs: Add error handling for negative returns from do_garbage_collect Yongpeng Yang
2023-12-22 9:42 ` Chao Yu [this message]
2023-12-22 9:42 ` [PATCH 1/2] f2fs: Constrain the modification range of dir_level in the sysfs Chao Yu
2023-12-29 19:10 ` [f2fs-dev] " patchwork-bot+f2fs
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=e2b88b1d-7d76-4eed-9eea-f4cca188c2c2@kernel.org \
--to=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=yangyongpeng1@oppo.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®