From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linux-iscsi.org ([67.23.28.174]:44949 "EHLO linux-iscsi.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751303AbdECDn2 (ORCPT ); Tue, 2 May 2017 23:43:28 -0400 Message-ID: <1493783006.23202.87.camel@haakon3.risingtidesystems.com> Subject: Re: [PATCH v2] ibmvscsis: Do not send aborted task response From: "Nicholas A. Bellinger" To: "Bryant G. Ly" Cc: Bart.VanAssche@sandisk.com, martin.petersen@oracle.com, turtle.in.the.kernel@gmail.com, seroyer@linux.vnet.ibm.com, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, stable@vger.kernel.org Date: Tue, 02 May 2017 20:43:26 -0700 In-Reply-To: <1493751261-81647-1-git-send-email-bryantly@linux.vnet.ibm.com> References: <1493751261-81647-1-git-send-email-bryantly@linux.vnet.ibm.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On Tue, 2017-05-02 at 13:54 -0500, Bryant G. Ly wrote: > The driver is sending a response to the actual scsi op that was > aborted by an abort task TM, while LIO is sending a response to > the abort task TM. > > ibmvscsis_tgt does not send the response to the client until > release_cmd time. The reason for this was because if we did it > at queue_status time, then the client would be free to reuse the > tag for that command, but we're still using the tag until the > command is released at release_cmd time, so we chose to delay > sending the response until then. That then caused this issue, because > release_cmd is always called, even if queue_status is not. > > SCSI spec says that the initiator that sends the abort task > TM NEVER gets a response to the aborted op and with the current > code it will send a response. Thus this fix will remove that response > if the TAS bit is set. > > Cc: # v4.8+ > Signed-off-by: Bryant G. Ly > Reviewed-by: Tyrel Datwyler > --- > drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 66 ++++++++++++++++++++++---------- > 1 file changed, 45 insertions(+), 21 deletions(-) Applied, with a small update to the last sentence of the commit log wrt to 'if ABORTED && !TAS bit is set'. Thanks Bryant + Tyrel.