To allow running tests using scsi_debug device with the zoned mode
disabled (current setup) as well as enabled, modify the _init_scsi_debug
helper function. When RUN_FOR_ZONED is set, specify zbc=host-managed
parameter to scsi_debug module so that the scsi_debug devices are
prepared in zoned mode.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
}
_init_scsi_debug() {
- if ! modprobe -r scsi_debug || ! modprobe scsi_debug "$@"; then
+ local -a args=("$@")
+
+ if (( RUN_FOR_ZONED )); then
+ if ! _have_module_param scsi_debug zbc; then
+ return
+ fi
+ args+=(zbc=host-managed zone_nr_conv=0)
+ fi
+
+ if ! modprobe -r scsi_debug || ! modprobe scsi_debug "${args[@]}"; then
return 1
fi