2017-11-08 21:32:11

by Bryant G. Ly

[permalink] [raw]
Subject: Re: [PATCH 1/6] target: Fix QUEUE_FULL + SCSI task attribute handling


> From: Nicholas Bellinger <[email protected]>
>
> This patch fixes a bug during QUEUE_FULL where transport_complete_qf()
> calls transport_complete_task_attr() after it's already been invoked
> by target_complete_ok_work() or transport_generic_request_failure()
> during initial completion, preceeding QUEUE_FULL.
>
> This will result in se_device->simple_cmds, se_device->dev_cur_ordered_id
> and/or se_device->dev_ordered_sync being updated multiple times for
> a single se_cmd.
>
> To address this bug, clear SCF_TASK_ATTR_SET after the first call
> to transport_complete_task_attr(), and avoid updating SCSI task
> attribute related counters for any subsequent calls.
>
> Also, when a se_cmd is deferred due to ordered tags and executed
> via target_restart_delayed_cmds(), set CMD_T_SENT before execution
> matching what target_execute_cmd() does.
>
> Cc: Michael Cyr <[email protected]>
> Cc: Bryant G. Ly <[email protected]>
> Cc: Mike Christie <[email protected]>
> Cc: Hannes Reinecke <[email protected]>
> Signed-off-by: Nicholas Bellinger <[email protected]>
> ---
>
Reviewed-by: Bryant G. Ly <[email protected]>


From 1583471187865790033@xxx Wed Nov 08 04:36:42 +0000 2017
X-GM-THRID: 1583471187865790033
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread