Re: [PATCH v3 7/8] scsi: have scsi_target_block() expect a scsi_target parent argument

Christoph Hellwig
2023-06-08T05:48:14Z

On Wed, Jun 07, 2023 at 08:22:48PM +0200, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>
>
> All callers (fc_remote_port_delete(), __iscsi_block_session(),
> __srp_start_tl_fail_timers(), srp_reconnect_rport(), snic_tgt_del()) pass
> parent devices of scsi_target devices to scsi_target_block().
> Simplify scsi_target_block() to assume that it is always passed a parent
> device.

Btw, one thing I realized is that the function has been a bit misnamed
for a while, and becomes even more so now. Maybe scsi_block_targets
is a better name as it blocks all the targets hanging off the
passed in devices as children?