Re: [PATCH blktests 4/9] common/scsi_debug: introduce _configure_scsi_debug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/17/23 05:47, Shin'ichiro Kawasaki wrote:
> From: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
>
> To set up scsi_debug devices with built-in scsi_debug module, introduce
> a new helper function _configure_scsi_debug. It works in similar manner
> as _init_scsi_debug which sets up scsi_debug devices with loadable
> scsi_debug module.
>
> _configure_scsi_debug takes parameters of scsi_debug devices in format
> of 'key=value' as its arguments. It calls another new helper function
> _scsi_debug_key_path to search sysfs files corresponding to the keys in
> /sys/bus/pseudo/drivers/scsi_debug or /sys/module/scsi_debug/parameters.
> When it finds the file, it writes the value to the file. The original
> values of the files are kept in the global array SCSI_DEBUG_VALUES and
> restored by _exit_scsi_debug.
>
> Among the parameters, 'add_host' has special meaning to add new hosts.
> Then it is handled separately so that it is set at last in
> _configure_scsi_debug, and restored at first in _exit_scsi_debug. Also,
> record the hosts which exist before _configure_scsi_debug in the array
> ORIG_SCSI_DEBUG_HOSTS. Those hosts should not be used for testing, then
> do not add them to SCSI_DEBUG_HOSTS.
>
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
> ---
>   


Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>

-ck






[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux