diff options
author | Chao Yu <chao@kernel.org> | 2024-01-29 14:27:40 +0300 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2024-03-27 01:17:23 +0300 |
commit | 3421cd7e909c93a5561f2316db706742fddf6eb5 (patch) | |
tree | 958414a30cb1d8c4309b07b2268d024110c7ba01 /fs/f2fs | |
parent | abe98a05e7162f64759bf9111108ebcb11322dec (diff) | |
download | linux-3421cd7e909c93a5561f2316db706742fddf6eb5.tar.xz |
f2fs: zone: fix to wait completion of last bio in zone correctly
[ Upstream commit 536af8211586af09c5bea1c15ad28ddec5f66a97 ]
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>
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/data.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 65fe48bb17d1..ac82e69a9f5f 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1010,7 +1010,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); @@ -1020,7 +1020,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)) { |