From patchwork Mon Sep 17 21:35:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10603511 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 5D91B17D5 for ; Mon, 17 Sep 2018 22:25:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DD1E2A78C for ; Mon, 17 Sep 2018 22:25:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40C182A794; Mon, 17 Sep 2018 22:25:08 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 D2FD52A6AC for ; Mon, 17 Sep 2018 22:25:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728658AbeIRDyZ (ORCPT ); Mon, 17 Sep 2018 23:54:25 -0400 Received: from out002.mailprotect.be ([83.217.72.86]:34075 "EHLO out002.mailprotect.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728655AbeIRDyZ (ORCPT ); Mon, 17 Sep 2018 23:54:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mailprotect.be; s=mail; h=Content-Transfer-Encoding:MIME-Version:Message-Id :Date:Subject:Cc:To:From:reply-to:sender:bcc:in-reply-to:references: content-type; bh=P/D5feAp36GXNf+Ei9iWjMzlwY27iZ9EPK6HMKIDBx0=; b=nSrVlb9hqewR YRX634qRq/iXUu3APvxYV/to+2fdFTLsADT+Z/5KfltkQledIdKMXiUkbR+4WyMr81p0SwOKF5yBl PLSX7MoWl2H6gT0pipN+7j1+2RRNmnkazHQ7JGtvhZA7LoIL6LbEyJmmAvAsCZMdYz0dhknN2wmJr Bs9JD2TlWoR2ETHjowTMKskh+Vm/Qpz8qi1yd74s9UgrGD5OeBemTQhE+V5sNjjLFzyniy+acLAAi ZyarUak+E3qEzGYLzj33D1hWLr0FA4eaKNhkmMViZWTv86K5eeaSGY/6eicsR6U9SKCidbE5G32Vn xDwfAGbU0gSYiInNOGhESw==; Received: from smtp-auth.mailprotect.be ([178.208.39.155]) by com-mpt-out002.mailprotect.be with esmtp (Exim 4.89) (envelope-from ) id 1g21Bh-0002fp-Op; Mon, 17 Sep 2018 23:36:10 +0200 Received: from asus.hsd1.ca.comcast.net (c-174-62-111-89.hsd1.ca.comcast.net [174.62.111.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mailprotect.be (Postfix) with ESMTPSA id 31AFAC0718; Mon, 17 Sep 2018 23:36:08 +0200 (CEST) From: Bart Van Assche To: "Martin K . Petersen" Cc: Christoph Hellwig , target-devel@vger.kernel.org, Bart Van Assche Subject: [PATCH 00/17] Make ABORT and LUN RESET handling synchronous Date: Mon, 17 Sep 2018 14:35:37 -0700 Message-Id: <20180917213554.987-1-bvanassche@acm.org> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-Originating-IP: 178.208.39.155 X-SpamExperts-Domain: mailprotect.be X-SpamExperts-Username: 178.208.39.128/27 Authentication-Results: mailprotect.be; auth=pass smtp.auth=178.208.39.128/27@mailprotect.be X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.03) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5hOqlr+qP4RqnwUtdF00he1602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6RYOYr2 X-Report-Abuse-To: spam@com-mpt-mgt001.mailprotect.be 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 Hello Martin, As you maybe know the LIO task management handling code is complicated because it is asynchronous compared to the command execution flow. This patch series makes task management function handling synchronous and thereby significantly simplifies the LIO code. Please consider these patches for kernel v4.20. Thanks, Bart. Bart Van Assche (17): target/core: Fix spelling in two source code comments target/core: Use the SECTOR_SHIFT constant target/core: Remove an unused data member from struct xcopy_pt_cmd target/core: Change the return type of transport_init_session from void to int target/core: Make sure that target_wait_for_sess_cmds() waits long enough target/core: Use sg_alloc_table() instead of open-coding it target/core: Use system workqueues for TMF target/core: Make compare_and_write_callback() accept NULL as third argument target/core: Always call transport_complete_callback() upon failure target/core: Make it possible to wait from more than one context for command completion target/core: Make ABORT and LUN RESET handling synchronous target/core: Reduce the amount of code executed with a spinlock held target/core: Avoid that LUN reset sporadically triggers data corruption target/qla2xxx: Simplify the code for handling aborted commands target/core: Remove the write_pending_status() callback function target/core: Remove several state tests from the TMF code target/core: Simplify the LUN RESET implementation Documentation/target/tcm_mod_builder.py | 8 - drivers/infiniband/ulp/srpt/ib_srpt.c | 9 - drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 6 - drivers/scsi/qla2xxx/tcm_qla2xxx.c | 31 -- drivers/target/iscsi/iscsi_target_configfs.c | 13 - drivers/target/loopback/tcm_loop.c | 6 - drivers/target/sbp/sbp_target.c | 6 - drivers/target/target_core_configfs.c | 4 - drivers/target/target_core_device.c | 16 - drivers/target/target_core_iblock.c | 4 +- drivers/target/target_core_iblock.h | 1 - drivers/target/target_core_internal.h | 2 - drivers/target/target_core_sbc.c | 20 +- drivers/target/target_core_tmr.c | 97 ++--- drivers/target/target_core_transport.c | 430 +++++++++---------- drivers/target/target_core_xcopy.c | 15 +- drivers/target/tcm_fc/tcm_fc.h | 1 - drivers/target/tcm_fc/tfc_cmd.c | 7 - drivers/target/tcm_fc/tfc_conf.c | 1 - drivers/usb/gadget/function/f_tcm.c | 9 - drivers/vhost/scsi.c | 6 - drivers/xen/xen-scsiback.c | 6 - include/target/target_core_base.h | 6 +- include/target/target_core_fabric.h | 4 +- 24 files changed, 272 insertions(+), 436 deletions(-)