Re: [PATCH 3/6] target: Fix quiese during transport_write_pending_qf endless loop

From: Bryant G. Ly
Date: Wed Nov 08 2017 - 16:30:02 EST



> From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
>
> This patch fixes a potential end-less loop during QUEUE_FULL,
> where cmd->se_tfo->write_pending() callback fails repeatedly
> but __transport_wait_for_tasks() has already been invoked to
> quiese the outstanding se_cmd descriptor.
>
> To address this bug, this patch adds a CMD_T_STOP|CMD_T_ABORTED
> check within transport_write_pending_qf() and invokes the
> existing se_cmd->t_transport_stop_comp to signal quiese
> completion back to __transport_wait_for_tasks().
>
> Cc: Mike Christie <mchristi@xxxxxxxxxx>
> Cc: Hannes Reinecke <hare@xxxxxxxx>
> Cc: Bryant G. Ly <bryantly@xxxxxxxxxxxxxxxxxx>
> Cc: Michael Cyr <mikecyr@xxxxxxxxxxxxxxxxxx>
> Cc: Potnuri Bharat Teja <bharat@xxxxxxxxxxx>
> Cc: Sagi Grimberg <sagi@xxxxxxxxxxx>
> Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> ---
>
Reviewed-by: Bryant G. Ly <bryantly@xxxxxxxxxxxxxxxxxx>