linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] f2fs: fix CURSEG_HOT_DATA left space check
@ 2025-08-06 12:32 mason.zhang
  2025-08-07  8:00 ` Chao Yu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: mason.zhang @ 2025-08-06 12:32 UTC (permalink / raw)
  To: chao; +Cc: linux-f2fs-devel, linux-kernel, masonzhang.linuxer

This fix combines the space check for data_blocks and dent_blocks when
verifying HOT_DATA segment capacity, preventing potential insufficient
space issues during checkpoint.

Fixes: bf34c93d2645 ("f2fs: check curseg space before foreground GC")
Signed-off-by: mason.zhang <masonzhang.linuxer@gmail.com>
---
 fs/f2fs/segment.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index db619fd2f51a..d8dae0049b6a 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -649,7 +649,7 @@ static inline bool has_curseg_enough_space(struct f2fs_sb_info *sbi,
 				get_ckpt_valid_blocks(sbi, segno, true);
 	}
 
-	if (dent_blocks > left_blocks)
+	if (dent_blocks + data_blocks > left_blocks)
 		return false;
 	return true;
 }
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] f2fs: fix CURSEG_HOT_DATA left space check
  2025-08-06 12:32 [PATCH v3] f2fs: fix CURSEG_HOT_DATA left space check mason.zhang
@ 2025-08-07  8:00 ` Chao Yu
  2025-08-15 16:40 ` [f2fs-dev] " patchwork-bot+f2fs
  2025-08-20  2:58 ` Chao Yu
  2 siblings, 0 replies; 5+ messages in thread
From: Chao Yu @ 2025-08-07  8:00 UTC (permalink / raw)
  To: mason.zhang; +Cc: chao, linux-f2fs-devel, linux-kernel

On 8/6/25 20:32, mason.zhang wrote:
> This fix combines the space check for data_blocks and dent_blocks when
> verifying HOT_DATA segment capacity, preventing potential insufficient
> space issues during checkpoint.
> 
> Fixes: bf34c93d2645 ("f2fs: check curseg space before foreground GC")
> Signed-off-by: mason.zhang <masonzhang.linuxer@gmail.com>

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

Thanks,

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [f2fs-dev] [PATCH v3] f2fs: fix CURSEG_HOT_DATA left space check
  2025-08-06 12:32 [PATCH v3] f2fs: fix CURSEG_HOT_DATA left space check mason.zhang
  2025-08-07  8:00 ` Chao Yu
@ 2025-08-15 16:40 ` patchwork-bot+f2fs
  2025-08-20  2:58 ` Chao Yu
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+f2fs @ 2025-08-15 16:40 UTC (permalink / raw)
  To: mason.zhang; +Cc: chao, linux-kernel, linux-f2fs-devel

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

On Wed,  6 Aug 2025 20:32:36 +0800 you wrote:
> This fix combines the space check for data_blocks and dent_blocks when
> verifying HOT_DATA segment capacity, preventing potential insufficient
> space issues during checkpoint.
> 
> Fixes: bf34c93d2645 ("f2fs: check curseg space before foreground GC")
> Signed-off-by: mason.zhang <masonzhang.linuxer@gmail.com>
> 
> [...]

Here is the summary with links:
  - [f2fs-dev,v3] f2fs: fix CURSEG_HOT_DATA left space check
    https://git.kernel.org/jaegeuk/f2fs/c/066694aac462

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] f2fs: fix CURSEG_HOT_DATA left space check
  2025-08-06 12:32 [PATCH v3] f2fs: fix CURSEG_HOT_DATA left space check mason.zhang
  2025-08-07  8:00 ` Chao Yu
  2025-08-15 16:40 ` [f2fs-dev] " patchwork-bot+f2fs
@ 2025-08-20  2:58 ` Chao Yu
  2025-08-20 17:44   ` Jaegeuk Kim
  2 siblings, 1 reply; 5+ messages in thread
From: Chao Yu @ 2025-08-20  2:58 UTC (permalink / raw)
  To: mason.zhang; +Cc: chao, linux-f2fs-devel, linux-kernel

On 8/6/25 20:32, mason.zhang wrote:
> This fix combines the space check for data_blocks and dent_blocks when
> verifying HOT_DATA segment capacity, preventing potential insufficient
> space issues during checkpoint.
> 
> Fixes: bf34c93d2645 ("f2fs: check curseg space before foreground GC")
> Signed-off-by: mason.zhang <masonzhang.linuxer@gmail.com>

It breaks f2fs/005 of xfstests, can you please take a look?

Thanks,

> ---
>  fs/f2fs/segment.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
> index db619fd2f51a..d8dae0049b6a 100644
> --- a/fs/f2fs/segment.h
> +++ b/fs/f2fs/segment.h
> @@ -649,7 +649,7 @@ static inline bool has_curseg_enough_space(struct f2fs_sb_info *sbi,
>  				get_ckpt_valid_blocks(sbi, segno, true);
>  	}
>  
> -	if (dent_blocks > left_blocks)
> +	if (dent_blocks + data_blocks > left_blocks)
>  		return false;
>  	return true;
>  }


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3] f2fs: fix CURSEG_HOT_DATA left space check
  2025-08-20  2:58 ` Chao Yu
@ 2025-08-20 17:44   ` Jaegeuk Kim
  0 siblings, 0 replies; 5+ messages in thread
From: Jaegeuk Kim @ 2025-08-20 17:44 UTC (permalink / raw)
  To: Chao Yu; +Cc: mason.zhang, linux-f2fs-devel, linux-kernel

On 08/20, Chao Yu wrote:
> On 8/6/25 20:32, mason.zhang wrote:
> > This fix combines the space check for data_blocks and dent_blocks when
> > verifying HOT_DATA segment capacity, preventing potential insufficient
> > space issues during checkpoint.
> > 
> > Fixes: bf34c93d2645 ("f2fs: check curseg space before foreground GC")
> > Signed-off-by: mason.zhang <masonzhang.linuxer@gmail.com>
> 
> It breaks f2fs/005 of xfstests, can you please take a look?

Ah, this was why I got failure. I'll drop this first.

> 
> Thanks,
> 
> > ---
> >  fs/f2fs/segment.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
> > index db619fd2f51a..d8dae0049b6a 100644
> > --- a/fs/f2fs/segment.h
> > +++ b/fs/f2fs/segment.h
> > @@ -649,7 +649,7 @@ static inline bool has_curseg_enough_space(struct f2fs_sb_info *sbi,
> >  				get_ckpt_valid_blocks(sbi, segno, true);
> >  	}
> >  
> > -	if (dent_blocks > left_blocks)
> > +	if (dent_blocks + data_blocks > left_blocks)
> >  		return false;
> >  	return true;
> >  }
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-20 17:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-06 12:32 [PATCH v3] f2fs: fix CURSEG_HOT_DATA left space check mason.zhang
2025-08-07  8:00 ` Chao Yu
2025-08-15 16:40 ` [f2fs-dev] " patchwork-bot+f2fs
2025-08-20  2:58 ` Chao Yu
2025-08-20 17:44   ` Jaegeuk Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).