* [f2fs-dev] [PATCH] f2fs: check free sections before disable checkpoint
@ 2023-12-29 3:25 Wu Bo via Linux-f2fs-devel
2024-01-12 1:20 ` Chao Yu
2024-01-29 20:29 ` patchwork-bot+f2fs
0 siblings, 2 replies; 3+ messages in thread
From: Wu Bo via Linux-f2fs-devel @ 2023-12-29 3:25 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu; +Cc: Wu Bo, linux-kernel, Wu Bo, linux-f2fs-devel
'f2fs_is_checkpoint_ready()' checks free sections. If there is not
enough free sections, most f2fs operations will return -ENOSPC when
checkpoint is disabled.
It would be better to check free sections before disable checkpoint.
Signed-off-by: Wu Bo <bo.wu@vivo.com>
---
fs/f2fs/segment.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 727d016318f9..8f8c0bb75be1 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -906,6 +906,8 @@ int f2fs_disable_cp_again(struct f2fs_sb_info *sbi, block_t unusable)
if (is_sbi_flag_set(sbi, SBI_CP_DISABLED_QUICK) &&
dirty_segments(sbi) > ovp_hole_segs)
return -EAGAIN;
+ if (has_not_enough_free_secs(sbi, 0, 0))
+ return -EAGAIN;
return 0;
}
--
2.25.1
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: check free sections before disable checkpoint
2023-12-29 3:25 [f2fs-dev] [PATCH] f2fs: check free sections before disable checkpoint Wu Bo via Linux-f2fs-devel
@ 2024-01-12 1:20 ` Chao Yu
2024-01-29 20:29 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: Chao Yu @ 2024-01-12 1:20 UTC (permalink / raw)
To: Wu Bo, Jaegeuk Kim; +Cc: Wu Bo, linux-kernel, linux-f2fs-devel
On 2023/12/29 11:25, Wu Bo wrote:
> 'f2fs_is_checkpoint_ready()' checks free sections. If there is not
> enough free sections, most f2fs operations will return -ENOSPC when
> checkpoint is disabled.
>
> It would be better to check free sections before disable checkpoint.
>
> Signed-off-by: Wu Bo <bo.wu@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: check free sections before disable checkpoint
2023-12-29 3:25 [f2fs-dev] [PATCH] f2fs: check free sections before disable checkpoint Wu Bo via Linux-f2fs-devel
2024-01-12 1:20 ` Chao Yu
@ 2024-01-29 20:29 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+f2fs @ 2024-01-29 20:29 UTC (permalink / raw)
To: Wu Bo; +Cc: wubo.oduw, jaegeuk, linux-kernel, linux-f2fs-devel
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Thu, 28 Dec 2023 20:25:07 -0700 you wrote:
> 'f2fs_is_checkpoint_ready()' checks free sections. If there is not
> enough free sections, most f2fs operations will return -ENOSPC when
> checkpoint is disabled.
>
> It would be better to check free sections before disable checkpoint.
>
> Signed-off-by: Wu Bo <bo.wu@vivo.com>
>
> [...]
Here is the summary with links:
- [f2fs-dev] f2fs: check free sections before disable checkpoint
https://git.kernel.org/jaegeuk/f2fs/c/e2f29120ff1f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-29 20:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-29 3:25 [f2fs-dev] [PATCH] f2fs: check free sections before disable checkpoint Wu Bo via Linux-f2fs-devel
2024-01-12 1:20 ` Chao Yu
2024-01-29 20:29 ` patchwork-bot+f2fs
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).