On Thu, Mar 14, 2019 at 12:46:33PM +0900, Shin'ichiro Kawasaki wrote:
> Since SCSI scanning occurs asynchronously, the kernel function
> blk_revalidate_disk_zones() called from sd_revalidate_disk() may be
> executed while write I/Os are ongoing. As a result,
> blk_revalidate_disk_zones() must not cause write I/O errors by changing
> zone related parameters of the device queue unless the disk has changed.
> This patch allows checking this behavior and catch regressions such as
> fixed by commit ccce20fc7968 ("scsi: sd_zbc: Avoid that resetting a zone
> fails sporadically").
> 
> To trigger disk revalidate, fio is executed with the --loops option
> causing the target device file to be closed and reopen at each loop. The
> file close triggers disk revalidate and fio starts issuing I/Os before
> revalidate completes, resulting in the desired simultaneous parallel
> execution of write I/Os and blk_revalidate_disk_zones().
> 
> Also move the _find_first_sequential_zone() helper function from zbd/005
> to zbd/rc and reuse it in the new test case for target zone selection.
> 
> Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
> ---
>  tests/zbd/005     | 13 ------------
>  tests/zbd/006     | 52 +++++++++++++++++++++++++++++++++++++++++++++++
>  tests/zbd/006.out |  2 ++
>  tests/zbd/rc      | 13 ++++++++++++
>  4 files changed, 67 insertions(+), 13 deletions(-)
>  create mode 100644 tests/zbd/006
>  create mode 100644 tests/zbd/006.out

Thanks, applied.

Reply via email to