Re: [PATCH 12/33] target: Add target_send_busy()

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

 



On Tue, 2017-05-23 at 16:48 -0700, Bart Van Assche wrote:
> Introduce a function that sends the SCSI status "BUSY" back to the
> initiator.
> 
> Signed-off-by: Bart Van Assche <bart.vanassche@xxxxxxxxxxx>
> Reviewed-by: Hannes Reinecke <hare@xxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>
> Cc: Andy Grover <agrover@xxxxxxxxxx>
> Cc: David Disseldorp <ddiss@xxxxxxx>
> ---
>  drivers/target/target_core_transport.c | 10 ++++++++++
>  include/target/target_core_fabric.h    |  1 +
>  2 files changed, 11 insertions(+)
> 
> diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
> index cfe69c1fc879..c28e3b58150b 100644
> --- a/drivers/target/target_core_transport.c
> +++ b/drivers/target/target_core_transport.c
> @@ -3130,6 +3130,16 @@ transport_send_check_condition_and_sense(struct se_cmd *cmd,
>  }
>  EXPORT_SYMBOL(transport_send_check_condition_and_sense);
>  
> +int target_send_busy(struct se_cmd *cmd)
> +{
> +	WARN_ON_ONCE(cmd->se_cmd_flags & SCF_SCSI_TMR_CDB);
> +
> +	cmd->scsi_status = SAM_STAT_BUSY;
> +	trace_target_cmd_complete(cmd);
> +	return cmd->se_tfo->queue_status(cmd);
> +}
> +EXPORT_SYMBOL(target_send_busy);
> +

This doesn't handle queue-full, or any of the other interesting failure
conditions.

It really needs to be using the normal completion path that already
handles all of those cases instead.

That said, MNC and I are working on a patch to allow this.

Until then dropping this for now.

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux