Received: by 10.223.164.202 with SMTP id h10csp142642wrb; Wed, 8 Nov 2017 13:32:11 -0800 (PST) X-Google-Smtp-Source: ABhQp+Tn8LTJSvpOj7K85iBHg3/nINiuiZFW7ACHmqFvD1AJbmNpnRiBB2Ena/5hyetBEWcRd0CB X-Received: by 10.101.68.202 with SMTP id g10mr1696909pgs.29.1510176731599; Wed, 08 Nov 2017 13:32:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510176731; cv=none; d=google.com; s=arc-20160816; b=c9pnc1ctLUfXh4TnyLqWq1AA//NzCN1uyhT6Cx6nt2bde86kOEPJ6QzIie3Gourb6W D9HUnNvaOz4eDBTm4RzELTDNal5xMs/O4R4OboxTSFLXJpJf4LFTaXNOHalH/P5YaURG 8QY7gp3Vm2d0wSkmeJ01m7ezU+5rjwCQprF3ZIBd/AIhvLBEYh1sSlCyOvtbrNF5tumQ YwM1ATp9L6tYnDYH5MnVw2hty3FCj/NB3fj134KewRFGRE+QkrtAmnmliaY4VJQ5ahRi CGAKnA1HMZKh0cVQZnl8aOHBWkcnG1s8Yx01smD2QpuLWQeXo4xOafaFrb48j/sHutQ4 h9nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject:arc-authentication-results; bh=7E7afPqew0yDnKei1ejiQ8y56V79UHglXgwW5S4Yw1A=; b=MAQcnoX2Dy15J/gS1SntqcynzP/rxnF2kjItRChXsgjobqxSxp0zZJZVNj9S9sJE+B p5K/nZZ1U28OEFM3UtRKFJlEIizHW8/YyzyDsfhT2nelzWiYCx9UV7iA2G0TrH0gT2fl VMhmewjsWLVmrMm8v9o/b1AgfqcJb83EfngbUmazfFuMJP6mz4zBNQkDYiElC/BzKO/A sm0j9XuvvcjfMlPk3JQQvbFRSjc2NUFelxr6NB/fd5OToFeAo6fipCLEEmFKGVaDpEpV EWNWzNovqaDdDh01Km8f91j7O4NhFHVKsW1W6UBidzRBI9yCjeMqV1Wy3U/9HYI1rak0 cMYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m4si4533384plt.333.2017.11.08.13.32.00; Wed, 08 Nov 2017 13:32:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753507AbdKHV3z (ORCPT + 84 others); Wed, 8 Nov 2017 16:29:55 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41928 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752842AbdKHV3x (ORCPT ); Wed, 8 Nov 2017 16:29:53 -0500 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA8LNg4e137235 for ; Wed, 8 Nov 2017 16:29:52 -0500 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e4896d22s-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 08 Nov 2017 16:29:51 -0500 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 Nov 2017 16:29:51 -0500 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e18.ny.us.ibm.com (146.89.104.205) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 8 Nov 2017 16:29:47 -0500 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA8LTkEr34996382; Wed, 8 Nov 2017 21:29:46 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4CC71AC03F; Wed, 8 Nov 2017 16:30:36 -0500 (EST) Received: from bryants-mbp-3.rchland.ibm.com (unknown [9.10.79.136]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id E71B0AC03A; Wed, 8 Nov 2017 16:30:35 -0500 (EST) Subject: Re: [PATCH 1/6] target: Fix QUEUE_FULL + SCSI task attribute handling To: "Nicholas A. Bellinger" , target-devel Cc: linux-scsi , lkml , Michael Cyr , Mike Christie , Hannes Reinecke References: <1510115512-15617-1-git-send-email-nab@linux-iscsi.org> <1510115512-15617-2-git-send-email-nab@linux-iscsi.org> From: "Bryant G. Ly" Date: Wed, 8 Nov 2017 15:29:45 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1510115512-15617-2-git-send-email-nab@linux-iscsi.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 17110821-0044-0000-0000-000003AC5928 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008033; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00943072; UDB=6.00475781; IPR=6.00723359; BA=6.00005679; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017916; XFM=3.00000015; UTC=2017-11-08 21:29:49 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110821-0045-0000-0000-000007DB72C3 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-08_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711080282 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > From: Nicholas Bellinger > > 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 > Cc: Bryant G. Ly > Cc: Mike Christie > Cc: Hannes Reinecke > Signed-off-by: Nicholas Bellinger > --- > Reviewed-by: Bryant G. Ly From 1583471187865790033@xxx Wed Nov 08 04:36:42 +0000 2017 X-GM-THRID: 1583471187865790033 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread