* [PATCH] f2fs: zone: fix to wait completion of last bio in zone correctly
@ 2024-01-29 11:27 Chao Yu
2024-01-29 16:19 ` [f2fs-dev] " Daeho Jeong
2024-01-29 20:29 ` patchwork-bot+f2fs
0 siblings, 2 replies; 3+ messages in thread
From: Chao Yu @ 2024-01-29 11:27 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu, Daeho Jeong
It needs to check last zone_pending_bio and wait IO completion before
traverse next fio in io->io_list, otherwise, bio in next zone may be
submitted before all IO completion in current zone.
Fixes: e067dc3c6b9c ("f2fs: maintain six open zones for zoned devices")
Cc: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Chao Yu <chao@kernel.org>
---
fs/f2fs/data.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index f45ecb810ae6..8cdbc5ae44db 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1006,7 +1006,7 @@ void f2fs_submit_page_write(struct f2fs_io_info *fio)
f2fs_bug_on(sbi, is_read_io(fio->op));
f2fs_down_write(&io->io_rwsem);
-
+next:
#ifdef CONFIG_BLK_DEV_ZONED
if (f2fs_sb_has_blkzoned(sbi) && btype < META && io->zone_pending_bio) {
wait_for_completion_io(&io->zone_wait);
@@ -1016,7 +1016,6 @@ void f2fs_submit_page_write(struct f2fs_io_info *fio)
}
#endif
-next:
if (fio->in_list) {
spin_lock(&io->io_lock);
if (list_empty(&io->io_list)) {
--
2.40.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: zone: fix to wait completion of last bio in zone correctly
2024-01-29 11:27 [PATCH] f2fs: zone: fix to wait completion of last bio in zone correctly Chao Yu
@ 2024-01-29 16:19 ` Daeho Jeong
2024-01-29 20:29 ` patchwork-bot+f2fs
1 sibling, 0 replies; 3+ messages in thread
From: Daeho Jeong @ 2024-01-29 16:19 UTC (permalink / raw)
To: Chao Yu; +Cc: jaegeuk, Daeho Jeong, linux-kernel, linux-f2fs-devel
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Thanks,
On Mon, Jan 29, 2024 at 3:29 AM Chao Yu <chao@kernel.org> wrote:
>
> It needs to check last zone_pending_bio and wait IO completion before
> traverse next fio in io->io_list, otherwise, bio in next zone may be
> submitted before all IO completion in current zone.
>
> Fixes: e067dc3c6b9c ("f2fs: maintain six open zones for zoned devices")
> Cc: Daeho Jeong <daehojeong@google.com>
> Signed-off-by: Chao Yu <chao@kernel.org>
> ---
> fs/f2fs/data.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> index f45ecb810ae6..8cdbc5ae44db 100644
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -1006,7 +1006,7 @@ void f2fs_submit_page_write(struct f2fs_io_info *fio)
> f2fs_bug_on(sbi, is_read_io(fio->op));
>
> f2fs_down_write(&io->io_rwsem);
> -
> +next:
> #ifdef CONFIG_BLK_DEV_ZONED
> if (f2fs_sb_has_blkzoned(sbi) && btype < META && io->zone_pending_bio) {
> wait_for_completion_io(&io->zone_wait);
> @@ -1016,7 +1016,6 @@ void f2fs_submit_page_write(struct f2fs_io_info *fio)
> }
> #endif
>
> -next:
> if (fio->in_list) {
> spin_lock(&io->io_lock);
> if (list_empty(&io->io_list)) {
> --
> 2.40.1
>
>
>
> _______________________________________________
> 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: zone: fix to wait completion of last bio in zone correctly
2024-01-29 11:27 [PATCH] f2fs: zone: fix to wait completion of last bio in zone correctly Chao Yu
2024-01-29 16:19 ` [f2fs-dev] " Daeho Jeong
@ 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: Chao Yu; +Cc: jaegeuk, daehojeong, linux-kernel, linux-f2fs-devel
Hello:
This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:
On Mon, 29 Jan 2024 19:27:40 +0800 you wrote:
> It needs to check last zone_pending_bio and wait IO completion before
> traverse next fio in io->io_list, otherwise, bio in next zone may be
> submitted before all IO completion in current zone.
>
> Fixes: e067dc3c6b9c ("f2fs: maintain six open zones for zoned devices")
> Cc: Daeho Jeong <daehojeong@google.com>
> Signed-off-by: Chao Yu <chao@kernel.org>
>
> [...]
Here is the summary with links:
- [f2fs-dev] f2fs: zone: fix to wait completion of last bio in zone correctly
https://git.kernel.org/jaegeuk/f2fs/c/cd3ac0d15df7
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] 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 --
2024-01-29 11:27 [PATCH] f2fs: zone: fix to wait completion of last bio in zone correctly Chao Yu
2024-01-29 16:19 ` [f2fs-dev] " Daeho Jeong
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