On 9/29/21 6:02 PM, Shin'ichiro Kawasaki wrote: > Test case #46 in t/zbd/test-zbd-support fails when it is repeated > hundreds of times on null_blk zoned devices. The test case uses libaio > IO engine to run 8 random write jobs on 4 sequential write required > zones. When all of the 4 zones get almost full but still open for > in-flight writes, the helper function zbd_convert_to_open_zone() fails > to get an opened zone for next write. This results in unexpected job > termination. > > To avoid the unexpected job termination, retry the steps in > zbd_convert_to_open_zone(). Before retry, call io_u_quiesce() to ensure > that the in-flight writes get completed. > > To prevent infinite loop by the retry, retry only when any IOs are > in-flight or in-flight IOs get completed. To check in-flight IO count of > all jobs, add a new helper function any_io_in_flight(). Applied, thanks. -- Jens Axboe