f2fs: zone: fix to wait completion of last bio in zone correctly
authorChao Yu <chao@kernel.org>
Mon, 29 Jan 2024 11:27:40 +0000 (19:27 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 6 Feb 2024 02:58:40 +0000 (18:58 -0800)
commit536af8211586af09c5bea1c15ad28ddec5f66a97
tree036cf676171574458827a5949cb94b465ca220eb
parentc7115e094ca820bb72e0c89f158d16bc48c6fa04
f2fs: zone: fix to wait completion of last bio in zone correctly

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>
fs/f2fs/data.c