On 6/8/23 12:45 PM, Vincent Fu wrote: > On 6/8/23 03:06, Shin'ichiro Kawasaki wrote: >> Fio with zonemode=zbd does accounting of 'open zones'. However, the meaning of >> 'open zone' is confusing because its definition is similar but different >> between fio and zoned block devices. The first patch in this series avoids the >> confusion by renaming the word 'open zone' to 'write zone'. >> >> Also, recently three bugs were found related to the open zones accounting. >> Following three patches fix the bugs. The last three patches improve test cases >> corresponding to the fixes. >> >> Changes from v1: >> * Reflected review comments on the 4th patch >> * Added Reviewed-by tags >> >> Shin'ichiro Kawasaki (7): >> zbd: rename 'open zones' to 'write zones' >> zbd: do not reset extra zones in open conditions >> zbd: fix write zone accounting of almost full zones >> zbd: fix write zone accounting of trim workload >> t/zbd: reset zones before tests with max_open_zones option >> t/zbd: test write zone accounting of almost full zones >> t/zbd: test write zone accounting of trim workload >> >> engines/io_uring.c | 2 +- >> fio.h | 2 +- >> io_u.c | 2 +- >> io_u.h | 2 +- >> options.c | 4 +- >> t/zbd/test-zbd-support | 64 ++++++++- >> zbd.c | 292 ++++++++++++++++++++++++----------------- >> zbd.h | 25 ++-- >> zbd_types.h | 2 +- >> 9 files changed, 248 insertions(+), 147 deletions(-) >> > > Applied. Thanks. > > Vincent Vincent gets these too, but pasting it here for Shin'ichiro: Please find the latest report on new defect(s) introduced to axboe/fio found with Coverity Scan. 1 new defect(s) introduced to axboe/fio found with Coverity Scan. 1 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s) ** CID 462265: (ATOMICITY) /zbd.c: 1554 in zbd_convert_to_write_zone() /zbd.c: 1554 in zbd_convert_to_write_zone() ________________________________________________________________________________________________________ *** CID 462265: (ATOMICITY) /zbd.c: 1554 in zbd_convert_to_write_zone() 1548 "%s(%s): wait zone write and retry write target zone selection\n", 1549 __func__, f->file_name); 1550 pthread_mutex_unlock(&zbdi->mutex); 1551 zone_unlock(z); 1552 io_u_quiesce(td); 1553 zone_lock(td, f, z); >>> CID 462265: (ATOMICITY) >>> Using an unreliable value of "in_flight" inside the second locked section. If the data that "in_flight" depends on was changed by another thread, this use might be incorrect. 1554 should_retry = in_flight; 1555 goto retry; 1556 } 1557 1558 pthread_mutex_unlock(&zbdi->mutex); 1559 /zbd.c: 1554 in zbd_convert_to_write_zone() 1548 "%s(%s): wait zone write and retry write target zone selection\n", 1549 __func__, f->file_name); 1550 pthread_mutex_unlock(&zbdi->mutex); 1551 zone_unlock(z); 1552 io_u_quiesce(td); 1553 zone_lock(td, f, z); >>> CID 462265: (ATOMICITY) >>> Using an unreliable value of "in_flight" inside the second locked section. If the data that "in_flight" depends on was changed by another thread, this use might be incorrect. 1554 should_retry = in_flight; 1555 goto retry; 1556 } 1557 1558 pthread_mutex_unlock(&zbdi->mutex); 1559 -- Jens Axboe