mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Cc: chao@kernel.org, stable@kernel.org
Subject: Re: [f2fs-dev] [PATCH] Revert "f2fs: add timeout in f2fs_enable_checkpoint()"
Date: Tue, 20 Jan 2026 20:40:38 +0800	[thread overview]
Message-ID: <cde115c8-9652-482b-b342-29fbcf4905bf@kernel.org> (raw)
In-Reply-To: <20260116215044.2565391-1-jaegeuk@kernel.org>

On 1/17/2026 5:50 AM, Jaegeuk Kim via Linux-f2fs-devel wrote:
> This reverts commit 4bc347779698b5e67e1514bab105c2c083e55502.
> 
> For stability, let's keep flushing all the data.
> 
> Cc: stable@kernel.org
> Fixes: 4bc347779698 (f2fs: add timeout in f2fs_enable_checkpoint()")

We don't need to add Cc stable and Fixes line due to there is no regression
issue, meanwhile it needs to change commit message a bit.

Otherwise, it looks good to me.

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
>   fs/f2fs/f2fs.h  |  2 --
>   fs/f2fs/super.c | 15 ++++-----------
>   2 files changed, 4 insertions(+), 13 deletions(-)
> 
> diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
> index 90aa1d53722a..8c256fcdcf5b 100644
> --- a/fs/f2fs/f2fs.h
> +++ b/fs/f2fs/f2fs.h
> @@ -311,7 +311,6 @@ enum {
>   #define DEF_CP_INTERVAL			60	/* 60 secs */
>   #define DEF_IDLE_INTERVAL		5	/* 5 secs */
>   #define DEF_DISABLE_INTERVAL		5	/* 5 secs */
> -#define DEF_ENABLE_INTERVAL		16	/* 16 secs */
>   #define DEF_DISABLE_QUICK_INTERVAL	1	/* 1 secs */
>   #define DEF_UMOUNT_DISCARD_TIMEOUT	5	/* 5 secs */
>   
> @@ -1482,7 +1481,6 @@ enum {
>   	DISCARD_TIME,
>   	GC_TIME,
>   	DISABLE_TIME,
> -	ENABLE_TIME,
>   	UMOUNT_DISCARD_TIMEOUT,
>   	MAX_TIME,
>   };
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 25f796232ad9..4869145531cc 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -2686,7 +2686,7 @@ static int f2fs_disable_checkpoint(struct f2fs_sb_info *sbi)
>   
>   static int f2fs_enable_checkpoint(struct f2fs_sb_info *sbi)
>   {
> -	unsigned int nr_pages = get_pages(sbi, F2FS_DIRTY_DATA) / 16;
> +	int retry = DEFAULT_RETRY_IO_COUNT;
>   	long long start, writeback, end;
>   	int ret;
>   	struct f2fs_lock_context lc;
> @@ -2696,22 +2696,16 @@ static int f2fs_enable_checkpoint(struct f2fs_sb_info *sbi)
>   					get_pages(sbi, F2FS_DIRTY_NODES),
>   					get_pages(sbi, F2FS_DIRTY_DATA));
>   
> -	f2fs_update_time(sbi, ENABLE_TIME);
> -
>   	start = ktime_get();
>   
>   	/* we should flush all the data to keep data consistency */
> -	while (get_pages(sbi, F2FS_DIRTY_DATA)) {
> -		writeback_inodes_sb_nr(sbi->sb, nr_pages, WB_REASON_SYNC);
> +	do {
> +		sync_inodes_sb(sbi->sb);
>   		f2fs_io_schedule_timeout(DEFAULT_SCHEDULE_TIMEOUT);
> +	} while (get_pages(sbi, F2FS_DIRTY_DATA) && retry--);
>   
> -		if (f2fs_time_over(sbi, ENABLE_TIME))
> -			break;
> -	}
>   	writeback = ktime_get();
>   
> -	sync_inodes_sb(sbi->sb);
> -
>   	if (unlikely(get_pages(sbi, F2FS_DIRTY_DATA)))
>   		f2fs_warn(sbi, "checkpoint=enable has some unwritten data: %lld",
>   					get_pages(sbi, F2FS_DIRTY_DATA));
> @@ -4335,7 +4329,6 @@ static void init_sb_info(struct f2fs_sb_info *sbi)
>   	sbi->interval_time[DISCARD_TIME] = DEF_IDLE_INTERVAL;
>   	sbi->interval_time[GC_TIME] = DEF_IDLE_INTERVAL;
>   	sbi->interval_time[DISABLE_TIME] = DEF_DISABLE_INTERVAL;
> -	sbi->interval_time[ENABLE_TIME] = DEF_ENABLE_INTERVAL;
>   	sbi->interval_time[UMOUNT_DISCARD_TIMEOUT] =
>   				DEF_UMOUNT_DISCARD_TIMEOUT;
>   	clear_sbi_flag(sbi, SBI_NEED_FSCK);


  reply	other threads:[~2026-01-20 12:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-16 21:50 Jaegeuk Kim
2026-01-20 12:40 ` Chao Yu [this message]
2026-01-22 23:50 ` [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=cde115c8-9652-482b-b342-29fbcf4905bf@kernel.org \
    --to=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@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: 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®