From patchwork Thu May 4 22:50:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9712907 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9FC3760387 for ; Thu, 4 May 2017 22:52:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93E46286B6 for ; Thu, 4 May 2017 22:52:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88130286BA; Thu, 4 May 2017 22:52:05 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, 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 A2742286B6 for ; Thu, 4 May 2017 22:52:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752934AbdEDWwD (ORCPT ); Thu, 4 May 2017 18:52:03 -0400 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:24825 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752857AbdEDWvN (ORCPT ); Thu, 4 May 2017 18:51:13 -0400 X-IronPort-AV: E=Sophos;i="5.38,289,1491235200"; d="scan'208";a="16197707" Received: from mail-by2nam03lp0053.outbound.protection.outlook.com (HELO NAM03-BY2-obe.outbound.protection.outlook.com) ([216.32.180.53]) by ob1.hgst.iphmx.com with ESMTP; 05 May 2017 06:51:11 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=1fD7jzdbrACshZNinqwGoP+f7nTSyBMfuHRgYLyUnXs=; b=M+wacSk7p7mz0UA4aUWnlrt5ht9jclz8Xs7z8JPtLexMKTFFiRhU5Ij+8i7KrkDlsGJxTA3mUobulSHc3CqhONwkvPrnhFahxQB0234ueZltEVuqaH/ukA0JFI7Zsi7p0ri69/89fPqEF4yRHYmHqXB9biehv7+/B9+2P4DcqKM= Received: from CO2PR04CA0105.namprd04.prod.outlook.com (10.165.94.159) by DM2PR0401MB1216.namprd04.prod.outlook.com (10.160.217.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11; Thu, 4 May 2017 22:51:10 +0000 Received: from BN3NAM04FT055.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::201) by CO2PR04CA0105.outlook.office365.com (2603:10b6:104:6::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1075.11 via Frontend Transport; Thu, 4 May 2017 22:51:09 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.21 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.21; helo=milsmgep15.sandisk.com; Received: from milsmgep15.sandisk.com (63.163.107.21) by BN3NAM04FT055.mail.protection.outlook.com (10.152.93.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1047.9 via Frontend Transport; Thu, 4 May 2017 22:51:09 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 89.D4.29323.B50BB095; Thu, 4 May 2017 15:51:07 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Thu, 4 May 2017 15:51:04 -0700 X-AuditID: 0ac94369-548749800000728b-fa-590bb05b47e6 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 45.F0.11415.850BB095; Thu, 4 May 2017 15:51:04 -0700 (PDT) From: Bart Van Assche To: Nicholas Bellinger CC: , Bart Van Assche , Hannes Reinecke , "Christoph Hellwig" , Andy Grover , David Disseldorp Subject: [PATCH 09/19] target: Add target_send_busy() Date: Thu, 4 May 2017 15:50:52 -0700 Message-ID: <20170504225102.8931-10-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170504225102.8931-1-bart.vanassche@sandisk.com> References: <20170504225102.8931-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrFLMWRmVeSWpSXmKPExsXCddJ5kW70Bu5IgxNXVCz2z3rGZPH1/3QW iwVv9rJZrFx9lMmibfUZRovWpW+ZHNg87m8/wuSx+2YDm8f7fVfZPNZvucrisfl0tcfnTXIB bFFcNimpOZllqUX6dglcGSeaZzMXXOer2L1oM2sD4zeeLkZODgkBE4mj11cydzFycQgJLGWS mHH+DQuEs51RYunRRUwwVRcP9jJCJDYzSpx+fJUNJMEmYCTx7f1MFhBbREBHYtbdF+wgRcwC txkl1jxeDVYkLGAqce7rSbBJLAIqEp23njCC2LwC9hKXdx1khtggL3F2y04wmxMovnfGfbB6 IQE7iTX9mxkhapaxSvz6lwTRKyhxcuYTsMXMAhISB1+8YIaoV5c4uWQ+0wRGoVlIymYhKVvA yLSKUSw3M6c4Nz21wNBUrzgxLyWzOFsvOT93EyMkBjJ3MN594n2IUYCDUYmHd4Ebd6QQa2JZ cWXuIUYJDmYlEd6IFUAh3pTEyqrUovz4otKc1OJDjNIcLErivOdkpkYICaQnlqRmp6YWpBbB ZJk4OKUaGBftXZ+81/DrRGOuR5uLnFO8nvqvz5W+Vmq+u9V3V1Pvtld/hL8y+DFtvH7iwaoJ ewqcy97euHLi0nUZH9efbmtS7R5Wfj4VJ2Q/v99G5MJ51bxHzd8ehAgJLFm9JbT2yFo1NV+L WXuLHisH7Zb37lvmWeEpy/7skvGE/C9z0mdr/FmqNe/Ez6VKLMUZiYZazEXFiQBpo9aDfQIA AA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFJMWRmVeSWpSXmKPExsXCtZEjRTdiA3ekwbdTBhb7Zz1jsjj4s43R 4uv/6SwWC97sZbNYufook0Xb6jOMFq1L3zI5sHvc336EyWP3zQY2j/f7rrJ5TFtznslj/Zar LB6bT1d7fN4kF8AexWWTkpqTWZZapG+XwJVxonk2c8F1vordizazNjB+4+li5OSQEDCRuHiw l7GLkYtDSGAjo8ST/18YQRJsAkYS397PZAGxRQR0JGbdfcEOUsQscJdR4kz3JzaQhLCAqcS5 ryeZQGwWAVWJS5sXgzXzCthLfFsyhx1ig7zE2S07mUFsTqD43hn3weqFBOwk1vRvZpzAyL2A kWEVo1huZk5xbnpmgaGhXnFiXkpmcbZecn7uJkZw6HBG7mB8OtH8ECMTB6dUA2P8ufOXbwnc j1o4OWnix3dT159v+mWzd70ir4rg1DlMS16GupzztHq0bL3biqZU7+2H0x0uxrwP3DMjqfCw wxZhwUX7ljzcstwljO+C5dZn6VGtAksYFc57M1w2bJ7eIrjZzKtilYzVQjFLHtaMrHbz5CWs 3+tk5LbnPXU1YY72rj/b8T1nkbUSS3FGoqEWc1FxIgC1OysuzQEAAA== MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.21; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(39410400002)(39400400002)(39850400002)(39860400002)(39840400002)(39450400003)(2980300002)(438002)(189002)(199003)(9170700003)(33646002)(2906002)(50226002)(356003)(6666003)(81166006)(47776003)(8676002)(5660300001)(4326008)(86362001)(478600001)(575784001)(5003940100001)(189998001)(305945005)(76176999)(8936002)(53936002)(6916009)(106466001)(54906002)(2950100002)(110136004)(77096006)(50986999)(38730400002)(1076002)(50466002)(36756003)(48376002); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0401MB1216; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT055; 1:/uPzjmSDsxtOiPa7zZMl02i2Wf2srSf8f81juOr9ioPRnT0kyWH5pTnB0mqEXsaT5YpwmIct6q74xfomlQNINF/cs95LEL5HYOvQhz2NsyffCDMlypQpyLVkrGsJuL+sMOHGE6+z5sTdS0wgDtyltijM5p3jk9Dbrll/NLlbNCYC6l6tO/sQLuIVSCvS+nU13p5NkU4bBT8yiPhs+NJePgJnFbESxRBuLUZKWP6QxLK0H6h42NCRvLWMFt1zxvYBHmU5FAT+uHEnmjAM5jAEoUmdKiB2zPmy51u4OqPyPo93+zwOx6HnbT4jojkwYVmKCUDD4fMpwgCPRZgKZaAkWJ6KkRuIP03BSSGP7RoZcuXO7gEeyZwWrWhbfTr8+P4lSjJINhF9O0L4hbEZxzDTN3rgRSivGA+OmahQvZIRbvVOp8USrLA64znoXDR1J/uOM10TZpV6wugPqzka2WL6DWDuhOxhMP8y+VEk+i5oQJZxhqRPoWe8VsNjcSBYX0c7ob5xLe4m9WLxccSDdsqEG84EZfrgqxtOmkbXK3B2CiQ= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8bbdf031-87dc-477c-c04e-08d493400e87 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:DM2PR0401MB1216; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0401MB1216; 3:E+p1DL/SrOqzBuPEdxayyWhLHMVAcuN/VNWdKmvVd53Im0ZI7QntRiYl1tkprDUJ5voIRbXa3bJ91EbqTltp1+IylVw0AJNACGm2KJdgLYeXj/pzJhkm4fn1317FWkg3Lz1jC4fCJtZbP3J4jimN8DafiLFEW58BFSw9uZIzKTsMLZvOjTE1/DKihZpIRdm6bGhc/CwgsunAfK+uN45Um0MHIw8oKE/n7VEm4nDoms7Sfw0Z28itW4M92xUQVtQvnn8YVvixyeqDxYzHzqqgLmulhzQMOb7hOGeLCUu8viPBs3eoM8Zp7Ga2+ykDQ/5M+kVUQrvh4wqAX4WzzhzngGr9jojhsymd3EOMubpB481QE12pjpKJajQp3mchox3lijNryUxs4YSPWkl6l7uz8RvRWuJx40mgt3Jmo6h9GSJPQexwsXwZNx4dr0Mgevq8Q+8F2UnDMfQrLfiH/TLz5AbhE3mT2V+/CbX2pTFFHDAS47veoo3zffWNcnq4/y9B X-Microsoft-Exchange-Diagnostics: 1; DM2PR0401MB1216; 25:e7UFOl4OZk1LAFecZhlsgGbPBrDQCeRsi23zoNoC/Go4ru3lAUICIr0LtqAQdn5VqRfyO4HjV2Sf8W4+gnnL9boIO+pbocNkJxdln1vA/p9GoTIf6CB4vpFFqSVwC9Tr0QJp9pMBL0hCqLoZ/SFv/KyGNyPXMIOR7CxGN3yahi/ynHlk6HXQJoMQ/GUUi466hHAAVzk/wN3EECPcUUbkCFe1M+7XbAJxwaZrHYPyTecRc98xeHY6b24KXO33dK4GUx66YeX0swaQYs5c9mRrKZZajWbWSdosAhOJB1kw/9ocwkFaUmR7vI32GFMedZVb5tV5WxM6belykbZiSYzTBFmNqEvq/Yz71LgKDg83wW+sqZJwtK+OAG18ePx4ByIXac0dyyLYQYmp+qid+fI0/zuiRtV2tOtZdAXiZYP9/Yt7DGJ7DsWE7Nb0U6Jn/CYjosC82qhcLYexJPu8beZs/K2JpI84b7KRb4zZ7OeNHJ4=; 31:x6YnabZ69WL6rgz3YDPuq/6lUQKmK8nYfw+6o+W6e3uCpgH5j0J38byFFZXQMf6LTncapL+eSxqpsnXzWyRgyx/CS5lT8O6fU1IOU9NoOIjX8cqiwinlfR56LGdAnHw1mkMI6ZZ5J+eu68PeTE87FDzAePSknvCD3u14s02y58vXtfyA/oy1GfXfoBK5X04v8aqqQs80R2UCRO+zFyRQzRPk5uZa57XeqDK1JCUg3GhwC1iOQf+drKIJG3ss/Vj6g+LVmoE1Dj0dAhq5+pC+fQ== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; DM2PR0401MB1216; 20:QEeuNxfvEYJ+e3D2vX25nNNHfPIAGq54+bB/o3qYRCm3joia/CrdxuHZKkGPlw7bECBtu/Y84l6YomSBFcZaV07kwidi4AWuq5PNg6iLmgfTC7lMjsgC2m0exiqAC4wo4VrQjm5UubQwNtTHSxvu16fbLrGlBj+MuCKn+huUef9f9+MFXnxqiED3zpA3i98ucNPmISIsoruRySc7y+jIxdKIJM0f1MjVcho55PJOwZIUtTLSfklg4Sk6b9uZnkvL0aW5n96UYWO6qUKWlM4Gi4CFoPpmPp2nu268wH21kNR5SSQ3KJrodbm+1dWRuzO7ZrFS/4Jtx1fFtITPujCdt5dvfvrykrTWIwPgHuZn3r/0p2/ZYENZK+atz4zs9tkN5iBePRpYdZOgL4Rtr2b7LX5mTxWO4B4AlzaUXd+EhDt1/fGCy9bnYUjreu9SZDWWbzDz+T7PA9ByrGciCB2I0ZIqBTLYWSA71yzlDsYGj2m0LtnnfDWfxY+Vi1YU9AIK X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(8121501046)(13016025)(5005006)(93006095)(93004095)(3002001)(10201501046)(6055026)(6041248)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:DM2PR0401MB1216; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0401MB1216; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0401MB1216; 4:qs9MBFPc902+K9rU8QpnUOjGwTYymJrMdbUpzY816JCPE46aOEWIrO+PHH7ad5owxAMtE+ehp0Ivhaen+DlY5nvLJp26lVXj86GCCRJaQK9y406DOVx3UN76tcC/6D1m0LbEcRUrL8tNJYuFZnj7+gV8/m8S8CFOKcQcvuPLinEWg/rhNZbwsE+dlPwWe6MskVew3DS/3U7wFXejBXcb99BkLMQcn/BqmHvifNmQQ0YiImmmy/C0DugIPkKHpLQ2rydj1ZTJsgu4t2ZaNF9NRBTvkgiad7Y6IvxOy+TDyuBEvtjIzg3DJdD9cSQ20VXL9LXZ6aO56gK8fqOWZZfkVvmyMcFutq6Bii3YA2vD5uoZzch5r4VOxcCF9F6yWJjW5rtEkx6GSC2XKPRfZ5UGAqfXYPDHhA64qGGKx7nz8Q5jEFoXxwIFPSrqbNQcfUV8ENf18F+Xqtk9VEpBf2+BZytyc546wN7o9zg/4ZpAiupMrtVDiYe0YFFftXFJKnep3fsPDdxfFrHNei3so8kjKjCQgw67DdndBrD5h4aaXckrbeEjnf1XnL4xWhwV0pBqfgJzzmPh3pVTcrbezHjD679Amd7dNm9Qepub+swQbNvEqUXS+JdUnkXaORsEjkgJdH0UUX5ahymFVEhyTrbPVumDVl+TG52smMjh2kjGs5j6d4afJ8l1oozzjkmCNJ00DCnurD6BAbWTbtdXriLUNZt33E07VBsf5Z/A2Q1jTg3EpGz/xg+5omx8y1sSGlSOC7LJrumUBqGDK65q9imI343HvO5ewW46b+TNmcVuBZERQyMwYJOMKDe0Kwx+ExHhsyDJjCtE9bdMMuUwW8lRV/bPb+UcOur9vzgvHDsMglzc3BF1USNdTeI9d/LzkAR3 X-Forefront-PRVS: 02973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CuVg==; 24:vNEaZ2MmSe6BsJlS64e6vmLWlurZVNOBfdbhLYBz+tMHB1RJbuB9VR5kDzRjnc0PeZ0RtZctIftQ01SQr2341x1gZFVgyhhZnvF73h4qpR0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0401MB1216; 7:3r2XtGPRchFa74lEf1FjdGP8y9EBYydEz4ZPLw2f84vlP7R+5DlywVedyWvoiGvOjSUt5DLG+mVJ7TUcLbcnBA3t+hc2PIBdzbvOA22JOotbl1rZrrbkeHw6XrqrbxC7GaFa2yjLTcZHx9StsUs4iu6KeTPX5CNMi/maO7E10PnDeyoJ7ue4a/jkPrViim+7a7AdGYmxZa51SieOR+vqVyi35AlGquWjjdw0mJgjEy18ews6iqkRVV7qVO8d5yGe9OdiylV7ecNyD6lFTOj6dsBGIldFI97/JR/5KZMzF7JKa5BsXrpyboUCKOUv+q2RSCAESLrMy5nrRN4SXVyV9Q==; 20:zuxW4V7ZKMz5lZbjYQmloI3iE3H4OOZ0fdmjDuRScsc1WOVc+uv0wwpoqjVsP09rhLd4IW3DSM4Z1BlsRonGh8yO9mQ8bHNYoPpuzK5+nTTRUWEe3xAuwkXZepg5mL7twZjb8Dvld6Mpz/LMPYQo+huGeY8vvrzjHS85DQ2/v70= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2017 22:51:09.1268 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.21]; Helo=[milsmgep15.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0401MB1216 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 Introduce a function that sends the SCSI status "BUSY" back to the initiator. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp Reviewed-by: Hannes Reinecke --- drivers/target/target_core_transport.c | 10 ++++++++++ include/target/target_core_fabric.h | 1 + 2 files changed, 11 insertions(+) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 86b6b0238975..49c5dfe1c72a 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -3026,6 +3026,16 @@ transport_send_check_condition_and_sense(struct se_cmd *cmd, } EXPORT_SYMBOL(transport_send_check_condition_and_sense); +int target_send_busy(struct se_cmd *cmd) +{ + WARN_ON_ONCE(cmd->se_cmd_flags & SCF_SCSI_TMR_CDB); + + cmd->scsi_status = SAM_STAT_BUSY; + trace_target_cmd_complete(cmd); + return cmd->se_tfo->queue_status(cmd); +} +EXPORT_SYMBOL(target_send_busy); + static int __transport_check_aborted_status(struct se_cmd *cmd, int send_status) __releases(&cmd->t_state_lock) __acquires(&cmd->t_state_lock) diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index d7dd1427fe0d..7d0f1ba610d4 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h @@ -156,6 +156,7 @@ bool transport_wait_for_tasks(struct se_cmd *); int transport_check_aborted_status(struct se_cmd *, int); int transport_send_check_condition_and_sense(struct se_cmd *, sense_reason_t, int); +int target_send_busy(struct se_cmd *cmd); int target_get_sess_cmd(struct se_cmd *, bool); int target_put_sess_cmd(struct se_cmd *); void target_sess_cmd_list_set_waiting(struct se_session *);