From patchwork Tue Oct 16 17:34:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ly, Bryant" X-Patchwork-Id: 10643917 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A17915E2 for ; Tue, 16 Oct 2018 17:34:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8A7B29828 for ; Tue, 16 Oct 2018 17:34:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCEE729C35; Tue, 16 Oct 2018 17:34:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D42929828 for ; Tue, 16 Oct 2018 17:34:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbeJQBZ7 (ORCPT ); Tue, 16 Oct 2018 21:25:59 -0400 Received: from us-smtp-delivery-107.mimecast.com ([216.205.24.107]:31127 "EHLO us-smtp-delivery-107.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727119AbeJQBZ7 (ORCPT ); Tue, 16 Oct 2018 21:25:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catalogicsoftware.com; s=mimecast20180821; t=1539711269; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=nnxC13u/kArSkoO/i3KA1M02fJDWmaBjg2IETIOaqwM=; b=EfUhwSmH/rwaw1BxuLX7e3Dr1Z3l/Y32izTwDpZyggRsfk2gLeihtLdixw/EknivKb+fldug2xoBg8CerD0wJd9TkpW/FwFuYkonegc92QJPnwkXlumGk/x80TPU5MGx6n0S4ZZFn4FiM1lcG1oOdKQCtr2bjbu1+02BakdANfs= Received: from NAM04-BN3-obe.outbound.protection.outlook.com (mail-bn3nam04lp0113.outbound.protection.outlook.com [216.32.180.113]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-225-FL7E9hvLP4eScYiJcP5XfA-1; Tue, 16 Oct 2018 13:34:28 -0400 Received: from DM5PR01MB2348.prod.exchangelabs.com (10.168.192.138) by DM5PR01MB2588.prod.exchangelabs.com (10.168.194.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Tue, 16 Oct 2018 17:34:26 +0000 Received: from DM5PR01MB2348.prod.exchangelabs.com ([fe80::a16f:30df:2f13:edb1]) by DM5PR01MB2348.prod.exchangelabs.com ([fe80::a16f:30df:2f13:edb1%3]) with mapi id 15.20.1250.020; Tue, 16 Oct 2018 17:34:26 +0000 From: "Ly, Bryant" To: "martin.petersen@oracle.com" , "nab@linux-iscsi.org" CC: "mchristi@redhat.com" , "target-devel@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "Ly, Bryant" Subject: [PATCH] scsi: ibmvscsi_tgt: Remove target_wait_for_sess_cmd() Thread-Topic: [PATCH] scsi: ibmvscsi_tgt: Remove target_wait_for_sess_cmd() Thread-Index: AQHUZXZ7PRUmgbec4U2dHqJPPPV68g== Date: Tue, 16 Oct 2018 17:34:26 +0000 Message-ID: <1539711249-12634-1-git-send-email-bly@catalogicsoftware.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BN6PR20CA0052.namprd20.prod.outlook.com (2603:10b6:404:151::14) To DM5PR01MB2348.prod.exchangelabs.com (2603:10b6:3:3a::10) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [216.48.126.222] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR01MB2588;20:DAisVfR3lgBFwV550QsTnVPyRDOJ61LBRHcYxhNu2wTPSDAZ+tOA1mV5DvV8vdco8YTCaQ1t94ru6y8z94/P3l1mzdX6JJ0pOmx517z6z6FdPFmt7kWsGppBzcYoFQM+S/xeT02jYojGIuXgSspVmumcMrKkTPphNEiC0McyxCE= x-ms-office365-filtering-correlation-id: 9725dba8-7029-4686-7877-08d6338d9e2b x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:DM5PR01MB2588; x-ms-traffictypediagnostic: DM5PR01MB2588: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93001095)(149066)(150057)(6041310)(20161123560045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(201708071742011)(7699051);SRVR:DM5PR01MB2588;BCL:0;PCL:0;RULEID:;SRVR:DM5PR01MB2588; x-forefront-prvs: 0827D7ACB9 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(136003)(396003)(39850400004)(376002)(199004)(189003)(107886003)(54906003)(71190400001)(5660300001)(97736004)(478600001)(3846002)(14454004)(2906002)(316002)(6116002)(2501003)(2900100001)(71200400001)(6486002)(106356001)(105586002)(5250100002)(36756003)(66066001)(53936002)(6436002)(81156014)(81166006)(7736002)(25786009)(305945005)(68736007)(86362001)(8676002)(102836004)(486006)(8936002)(476003)(52116002)(14444005)(4326008)(1857600001)(26005)(99286004)(386003)(256004)(6506007)(110136005)(186003)(2616005)(6512007);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR01MB2588;H:DM5PR01MB2348.prod.exchangelabs.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; x-microsoft-antispam-message-info: nFrUkLqdUEcGWipPk42gKlT1Su/CmCM2eT8t2TEUhf9XWBOMUSWT7Xq40m9a5FLGfcrLcHmGzAQjrVfRWzvlrdfrDpq3jj4Rnn92QfNxP7Y2Fw2tCnXxw4pbPsbZymAsuZgArCz2hcLijNgMKflp/tsneYZjwGPui01cNyWtlzQEkd/jkonCBbUgFWblcLcKcWLDtSgg0/TazE2wu6qq3XXHQO6YfbBH8vzXkjrmxW/3v6w/MDsFzCeVwn6itMy4CuajBLaMVPY4cO6Z46XkUBHwliOqMh6XFgLOHonfZlvt0SVZ3+3WVazKY0QpE1TRPwMDMnhdfJ1D0onq1fOJYSKm/8+v5XXCeV4ZrDv9tJY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: catalogicsoftware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9725dba8-7029-4686-7877-08d6338d9e2b X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2018 17:34:26.1812 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ea3d63e8-dd40-410b-9496-d2ee49ccddc3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR01MB2588 X-MC-Unique: FL7E9hvLP4eScYiJcP5XfA-1 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Bryant G. Ly" There is currently a bug with the driver where there is never a call to target_sess_cmd_list_set_waiting(), it only called target_wait_for_sess_cmd(), which basically means that the sess_wait_list would always be empty. Thus, list_empty(&sess->sess_wait_list) = true, (eg: no se_cmd I/O is quiesced, because no se_cmd in sess_wait_list), since commit 712db3eb2c35 ("scsi: ibmvscsis: Properly deregister target sessions") in 4.9.y code. ibmvscsi_tgt does not remove the I_T Nexus when a VM is active so we can fix this issue by removing the call to target_wait_for_sess_cmd() altogether. Signed-off-by: Bryant G. Ly Reviewed-by: Mike Christie --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index fac3773..2175e9e 100644 --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c @@ -2266,7 +2266,6 @@ static int ibmvscsis_drop_nexus(struct ibmvscsis_tport *tport) /* * Release the SCSI I_T Nexus to the emulated ibmvscsis Target Port */ - target_wait_for_sess_cmds(se_sess); target_remove_session(se_sess); tport->ibmv_nexus = NULL; kfree(nexus);