From patchwork Tue May 23 23:48:33 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: 9744447 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 9DB0B6037F for ; Tue, 23 May 2017 23:49:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 908ED2885B for ; Tue, 23 May 2017 23:49:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8579228862; Tue, 23 May 2017 23:49:38 +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 DCFD92885E for ; Tue, 23 May 2017 23:49:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031003AbdEWXtg (ORCPT ); Tue, 23 May 2017 19:49:36 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:5121 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1765543AbdEWXtO (ORCPT ); Tue, 23 May 2017 19:49:14 -0400 X-IronPort-AV: E=Sophos;i="5.38,383,1491235200"; d="scan'208";a="21079232" Received: from mail-cys01nam02lp0051.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([207.46.163.51]) by ob1.hgst.iphmx.com with ESMTP; 24 May 2017 07:49:09 +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=EcaoNQSOO2CWEu2j9qmuOClxEx4FlirLmVGqG2jndCI=; b=INy3lkeqlT+Y3ztEnBG5AvcYkLYQ1RKdfCweEpjHltguM/HgP96pGunn8mOgUZ9S8bihXSbaMyxmM7w8KAjbtv/k+xHewdjxHBOPqJOhkYjb7XYBrYnrxlZATUg2Ooqo4kIsdueBaweAgrnyN5jejHWSRTKfox0zTddLO6AZPg8= Received: from BN3PR0401CA0042.namprd04.prod.outlook.com (10.162.159.180) by MWHPR04MB0513.namprd04.prod.outlook.com (10.173.49.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Tue, 23 May 2017 23:49:06 +0000 Received: from BN3NAM04FT010.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::205) by BN3PR0401CA0042.outlook.office365.com (2a01:111:e400:51d1::52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Tue, 23 May 2017 23:49:05 +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 BN3NAM04FT010.mail.protection.outlook.com (10.152.92.117) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1075.5 via Frontend Transport; Tue, 23 May 2017 23:49:04 +0000 Received: from MILHUBIP04.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 C8.D1.45291.E6AC4295; Tue, 23 May 2017 16:49:02 -0700 (PDT) Received: from milsmgip12.sandisk.com (10.177.9.6) by MILHUBIP04.sdcorp.global.sandisk.com (10.177.9.97) with Microsoft SMTP Server id 14.3.319.2; Tue, 23 May 2017 16:48:59 -0700 X-AuditID: 0ac94369-166ac9800001b0eb-fb-5924ca6ea011 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id CB.F2.18148.A6AC4295; Tue, 23 May 2017 16:48:58 -0700 (PDT) From: Bart Van Assche To: Nicholas Bellinger CC: , Bart Van Assche , Christoph Hellwig , Andy Grover , David Disseldorp Subject: [PATCH 12/33] target: Add target_send_busy() Date: Tue, 23 May 2017 16:48:33 -0700 Message-ID: <20170523234854.21452-13-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170523234854.21452-1-bart.vanassche@sandisk.com> References: <20170523234854.21452-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRmVeSWpSXmKPExsXCddJ5kW7eKZVIg5m7LC32z3rGZPH1/3QW i5WrjzJZtK0+w2jRuvQtkwOrx/3tR5g8dt9sYPN4v+8qm8fm09UenzfJBbBGcdmkpOZklqUW 6dslcGVcmbKKveABX8XVjRfYGhj/83QxcnBICJhIrLjo3cXIxSEksJRJYuH5u+wQzjZGiVVv VjN2MXKCFZ1espYNIrGRUWLOzy9gCTYBI4lv72eygNgiAjoSs+6+AOtmFtjBKDFx5W52kISw gKnE+9YLYA0sAqoSty7dAIvzCjhIXH6zmgVig7zE2S07mUFsTqD4yj3bmEHOExKwl7j8XRlk poTAJFaJA7uuMUH0CkqcnPkErJdZQELi4IsXYL1CAuoSJ5fMZ5rAKDQLSdksJGULGJlWMYrl ZuYU56anFhia6hUn5qVkFmfrJefnbmKEBHvmDsa7T7wPMQpwMCrx8CY4qEQKsSaWFVfmHmKU 4GBWEuFdvgEoxJuSWFmVWpQfX1Sak1p8iFGag0VJnPeczNQIIYH0xJLU7NTUgtQimCwTB6dU A2PKkoTn7wp3NGTVXVE+Jrtw/f/VLcbq3ssP3alQlzk6gVH43oMAJ01d+08z3ZwZt71pOV0w SW/jUqn9tksm7ZU69zhvz7eM6U7TXr1uuvek0e91e9SMtVv+yD5gSHlaNKGCudZC743c/b1d +qIf/rhG7HaaeXXZ5sqVd8V+XAzxczZeXrldMUpDiaU4I9FQi7moOBEAB7lASnICAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPJMWRmVeSWpSXmKPExsXCtZGTTTfrlEqkwdZ2BYv9s54xWRz82cZo 8fX/dBaLlauPMlm0rT7DaNG69C2TA5vH/e1HmDx232xg83i/7yqbx7Q155k8Np+u9vi8SS6A LYrLJiU1J7MstUjfLoEr48qUVewFD/gqrm68wNbA+J+ni5GTQ0LAROL0krVsXYxcHEIC6xkl Fu85xwKSYBMwkvj2fiaYLSKgIzHr7gt2kCJmgV2MEpMnnABLCAuYSrxvvcAIYrMIqErcunSD HcTmFXCQWPf4NRPEBnmJs1t2MoPYnEDxlXu2AdkcQNvsJS5/V57AyL2AkWEVo1huZk5xbnpm gaGRXnFiXkpmcbZecn7uJkZIkETtYLw+0fwQIxMHp1QDY9mB/vl5Ctci+Nz8tk291yUQbfnl 2vKYxccTtzM2//h485e8SMQXFq/Edt2ADUeU5wWLl59WvqWZyP834iy3/ek3ikuEK281HCq1 eSD9IVWwKeuTf+7Mpb+tgo0TjirKs8Tm/3u/U5rLYWq08EdXTz2uv2nhvgo2L7r9j2xfKcV7 Zc2jXB4GJZbijERDLeai4kQAOVwyV8IBAAA= 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)(6009001)(39840400002)(39450400003)(39860400002)(39400400002)(39410400002)(39850400002)(2980300002)(438002)(199003)(189002)(9170700003)(189998001)(47776003)(5003940100001)(2906002)(305945005)(4326008)(77096006)(36756003)(72206003)(54906002)(478600001)(6916009)(50466002)(33646002)(53936002)(38730400002)(106466001)(110136004)(5660300001)(86362001)(2950100002)(8936002)(356003)(1076002)(8676002)(50226002)(50986999)(6666003)(76176999)(48376002)(81166006); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR04MB0513; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT010; 1:eDInWUIG6MN7yFnZsbS1oOFbR5NksknU3kC9NKSF1n3HB8CU2x1OjHtd4+edZeudSVVqonRkk0xhQLNjvIlwuq9vXYAD5Vdad1N9vLlVOaKJ6iJK/kxXuSATvd1pERzhLAL1j1P8V9hCLnCxYAeB8+d0q7L2waqHQF0mZvawDfrQjGnNVScAYftCYWm5mF9uMzU71/huzJbQavmeHWeKDuvtlLs8ANIax/kBM78nfq5sD7n3DrzNPwCrUIlc3USXj9/b0Uw0RbwLm8cpWvq0TcvrmR6NyV8KeMTvgkMQ2qe6FuALWYxsaV/WQ6lDVE6uNvSbaoJeZaqgeAjXF/V1irAxj9eupCL3KGRHGnNDLcCjS7koXV5/nOTYbCA8lZYQLfV/dj68eUOt8EZhJouocA4mwDWyM7xz7Q9EXeQi/2wJ4LPCQVyZR+SthpJFzsU2xYLb3/fvRIJec9vyPnmHdMQ2i4JKRz22iHxXkUwP9u9F6QuQehx7qcV8hvIVHDmkurVyPx2ROzzw9B6hk9Zo93K5j9a7IXj0tZHtaUCJnk0= X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR04MB0513: X-MS-Office365-Filtering-Correlation-Id: cd9ee5e2-d57a-4962-2818-08d4a2364c00 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:MWHPR04MB0513; X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0513; 3:q+7b/h95S0P33+Ja7TesmU4Hm7DoWl0eFmAtbWEHpxKnGrjIJADyetGap137xhhrDZkjvJo9OX1T2HaYo82U4XOrRzNrv/tXaHvSHqzpIhPImpb97z/4VkDDsw5vCPVwbzvx4OxuqY8qsCzViAMrMJ6giDsMkJqGCaVHdMQQOhaDpvQbj3ivfTFCmAb90F5RJUf7Y/j6m78JfnJTx2q+QoErxRygvo2UEPQveWzC7tln2gKYE63lmWK6F+QHMB3KSV8S4VTSEcX5zqmeAWK2U0Xu2kTLUnEF3EkXx8ucJwHusH5L7JATkp4eTodsqo8a2zz6R5BV1Vyi2j1abYTdR76wU5FbwNalr3ZbnlJKQO7Usd303tQ+t5tt4tPXVRUE1QbEXzYnTqz5NxmI3nQyFOAiLuv7NHExv8g6wJJEfk1DpyaF+MoOdDeh68Vc4howN9n7LrgOPZXGnCP53NcRHUQmuaxBo4nZgEds3c+cSPPVXRKZO1I87CShXksk1n6Y X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0513; 25:GbZogK45zaEIJqls4hzYzK1WfMH3+VJ2Pb4K5smQV4sMd4YNOHO09UYL800awcRM7iWPa38fvfCExeXzloelXV2/Hj/cmwGTnBXn8KrJ1uSBCw/6mrSbuMqlalrjXd49varsyrPSUYYxh67OjYTJ30qLqT2SUWY/1ZWnmeAMco7PwFk1VrIwUdIRsAUlRVqQPvdDaIy3OBv4z1skMUYHnyE4Oz3xlgxVnhi001xoORjETpMSl2xjFyrNhJUoMCTsdpdOjbXNGlZ3VYkC2XH7tTnOoBvNyWWUUkgOYbRKlCDcQzmcRD18lik3R784PQ9tio27S4LVYbEsn6zoeHYPPer3a/QUGeBYfR31ve2hcj8x8UGwp9o18QYQsUFutG+CK6V7zDSAHbREawMIxqsukpsGfgJtOsJv/pKny26LrSY/KNhbKNi4lRubo3bRZDbZTulL27O2ezY2k2l4uzcrECNv8opiaCaTl7V2UiJ5NuY=; 31:LVWwhP2Tdkfr4QL8UewwA0YInRNUrUetutUSNGW0qv6cOwOZe3q4EHl/QZtFg/myfyKdqx1jAr9Avd02KBAVuQD9N+kkrarajG+xpkDTJyeypqrvXQoVjGzJHdxBlTWMoHiSfZVixzUZMQuhRFdrXv52weqnQR9FIY1DIQFpKgo+bghPpt00U0qiNqVR7EPataUDIp3tLLrLTZdloI1OyyZr5Ju0zJj+tyZGWOX9pwD8R0LfBiqXcWHLHlzu9h3/xMa6MUZvnNLBf7qJIXlihQ== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0513; 20:yTV1kolFfL1BCB8YeRmIYqCyYIGGIhlauFIcZjwKVBPpa2yjr6oKXCcWow8LqlKzDIBOSqyklrVhTVja7Ud/fd5glU+THL4lmwu30pEiRfkl6KH/7gDeCHHjST042aLrXYhPcSMsWMLLCFMNlYtHf3q/9L1lS8pUkGAuRx9lFwfvMcg2P7o369msNZSgJ2MrREidFO4tiDiecEguxxKrvpL6m3iGEtEB18c9h2CPdnNHkQfTpsAD8qDSZnsxklhrllCCJ7sxcZ/qB0ABakc+fkVfzuVWUPIglLGsnsFornPLAUhKh/9Xq7hnlFVkqeGdgwgGuUdf//GvddavH3kkvUeq+RbkCggQBcHdXQTq9/ROvGDXFhWLPANliOhwhPs+ElPHtu8uM579bzQfGfh8y6/KWmhyN4ZSeo3EFIp6jjpN0We3BuFeNYKe9dqfcmCwygKPOZbZITNDAHPu3/lniJ111RP0RtTbPvpjts3k7SN4KYOw1Z+MLq4s9cSDdArf 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)(5005006)(13016025)(13018025)(8121501046)(93006095)(93004095)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148); SRVR:MWHPR04MB0513; BCL:0; PCL:0; RULEID:; SRVR:MWHPR04MB0513; X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0513; 4:NQXIaTPOhEtQNjbB6H6VevdnLkaMqs7aIBFkOiL5HPRkmwd+MkEASkaUeWBJU5kmooFw4Xhm/9AYL59g6FZnAPtGucg5ryT9B366oOmiTY8cb8lGBfylcxQutNJMBf01qExXHkE9vWmTjBR2de/oqDmW3QWkG9F0zoV7LD76XH+7GP9aTjL15iQKf/Eag+7R6cl3dv2yZ0VkHu55TdOB+CvC04p9IhW56et/PSRhiEJLB88z5bIppl8LeZXKVbYnsYyKFOESM7Sax6cVt9EBuC+DjG7OpdiFm4h2q4HCEOAXXadAYkWOT0SONarEkv0ok2w3VQ2gsRW3I7cczcidXPpx652FNFl8qBKLErarDWquqT9H7qfWx6Wmacv4hfv0rGSz0GQWqj5iPckQYoazqxAAIrJJCn9sWvIig3d0d6iSHFy0T0EgVa5opbVdBl77KKVsBXmvr/ZIWwgem6r0BOKKYKxilgG111hQ8UhAlX6Hns3hDzjHKswptM/poDgvJr+Ri1LvEeEb+28rC4MszGs+l7kLmuvpPb22CUNwnuqeYsBSMs2+qAd98Ttd7Cz54fyu8AxoAnYuHBN6w0KRhOj1khT8PUC70LdUEPrrbrYVQPAtBMqzcWYQMiWZafhzJrevr5xjRWUuofOlgei+pOGpQ02+1NBGqn6wObbViwdGX2L8SMMZBjNNtn4Jsm8Z2oYDtH5tDOIJqzmlY7J1diBBjQUHtJxQ+RfBBEPP5kKjmrq9QZj1puvHJC7P6LGhSOcW1bCeqqaXpvnCk4Kt30tJzV3WqGYW6a/PZG2bmQm1lpXml6rwfEqDZv06Z1kXFzZczLfGZX7EqA8f/uqVZs5KWV5CDuXW2jLMH58kutFuQRQ5RlrxaWNEm63Dezx+ X-Forefront-PRVS: 0316567485 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR04MB0513; 23:UznpkJdcFyJCEfNkdB5RpzWtmFqUCqNBZQMu+yIoD?= =?us-ascii?Q?a8QNt6JilhUHEb5F24qd11BhIB4P08vjyvmigMLCw5EtU0zGSdAv/48Ja/rG?= =?us-ascii?Q?F//xizLqW3omK9dfl/oOCy2dtt5/jffxuswyYTnYqx5ITabMNDmR6lHuoxj0?= =?us-ascii?Q?jO4Fg1jgC7LSQasv9beKHPWLYKRBY/670jYENagBUKx4BOc7OHGjdYCIQz3A?= =?us-ascii?Q?9OOZfR+D7HAqtuCFAu3aMyvxOg+CrSdYqU61cz1XUXfvjr6a2UxMqzoW/I8K?= =?us-ascii?Q?4ZsQXrQnePXK8oN83hPInFo6m8a6Q7IpvQ+zf193hdHEELPC9P/iiW6/kdjD?= =?us-ascii?Q?xGYgff0MqO0nXtoXjSAYtXJFVyw66kHb6/SsrovJbZSXH7dr+4udZjDfBH0/?= =?us-ascii?Q?m1qHTMU4Ccy5GOc8hdD0zzgMuCxZ+BX9a555TgBHVTDY4PnNv1efMQmJjSad?= =?us-ascii?Q?SqEjG9CfjHjusVT0904L5XgTcVMBnRmnAJI6u3v4y2IcrjacEtt2l0k82SSd?= =?us-ascii?Q?ncm2Rca9kxU19OHTcBr8b9hh7Qyx1OVw5PATfjUayhKR2bciUcen4b7fZuZd?= =?us-ascii?Q?qpyh0yY6JZuZZL2SzvF/1wb7mAdC9UKzxfcQxLDFmqPW9MsMG77swPu3jL4H?= =?us-ascii?Q?FALi/zLWli9S9yWB8Vfjezg8331CrCsfmkigFl2pbY+09d8KaNVlwYN7+Uf+?= =?us-ascii?Q?FHpC5EKQQEH2wsZfmufO53m7cEPh6REMEXQEnwBdPnlZb9WvLhSFNXBlJSCh?= =?us-ascii?Q?nEF4MLstGpEsR/10wFuYgDCda+HZACjmWW8S8ZquRP0B7JdkHTtvxd2bGf25?= =?us-ascii?Q?rrOReL3Tjoh5NrOiFDmQUs7+wttQJSMUQEwxfEHeNa3Uy7yCxvU1qgQHrPGc?= =?us-ascii?Q?tItKVJkr0a8EG+H3YkMBQlgkHPi2MEDabLyb67WppS11BdRwucGiAwAJbxA1?= =?us-ascii?Q?nXGbhsZAn2kUkuk6u9ZFlAJjalGYXFxD+d/ray8WRHm1sbfi+CqLTQwxcwty?= =?us-ascii?Q?5hD3ZA1ddORo175J8aPgMyotse8LtHP+IPSOUsKojg2C1GmwheXLB5m+XHbV?= =?us-ascii?Q?7QaIZ5Tc4oXZkjt/s2Anka7eHiILwFHslvsA9dzrLuwZr50Zg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0513; 6:2Q5vq4gtppFgVzL9dm1Uku+S8F2ecMAJ0o6G9dNokkNz3lcuEN5KJXBLdJKdwFRvNOzvZutvw9Bv/k2tsAZ5C5z43fFqo5yd2RX6CqSrYPnZFfBBsYZAfb+V51lBxHIsC7UdHCAoyyVYTazVSxEzNYCjJD024k50ngsBRxSENwBuQYzx7fuI34x2fV6sPRKWklGwBDXBQemad0yicxeQjrnsg/oUmhiOwKM0Mzs03OQPaxuA8tAq8ZlGfByoLvQ3jkQnjzX7UWLiyvxeKj+FHelvgs9da8oBgcUGOuiO7n8WcB4KxAmZq2wYVX9xh+vKJVWyNmG9VxCqcaQmNZNIwzUYicalLeOpAuVh5Q2xU5tfAAywh4gUsPTKy0hqkhB2+ZoCY643F0IFaKF6zuXzCrEe8jTO2DtfKVkp9VnP33aZgIUCsd1iKb+MKYxriJa45aqbDX9XY0zY7ax6h0LPzJ1obQJaz2EnPgH3iMlf5tOJ1XpKh34+gs8GagfvDeT/sph/XHggnyOJuP59/QZnGKbrer8GZaFTdeIhwayZlaI=; 5:ROXTmHOh9eoCLjRRGwuoYVprQ9YrsC/YTZyc1U9Kg/+duKaUJhXm41hXwNy0j4s7gsu0ceqoFM5RjtPaeIk9S9Ok4klDn28xvL98AuMLSC1MjLAuSQsVx+JIqs2CCIIHo5+T1fBlsSrePPDPbWHZzA==; 24:f4bXl7GvyRrE7iwNa2MJEkN2zc2UtD3KEgFG7xhd+77KeAKpS/+PblFpQawFXEJFnegFtVJRTmPUq6i7wbKu4a/jJmu7R/6fvvy/IAQjhJk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR04MB0513; 7:W2EopiuJ2U97Wfj3gT5vK0AHIyIkUHAJZOREFEEFHKZA6NSd8poaesJXyNJ2Ctu6TkXy+I+tO8EZuFLKD013v1E/76Di+PRJNkKGALVsz2rUTWehs1q3W/Vtlm6dmvNapqJxrxmGDuJtCtqNgQt0HJCBiI5L4atlhVBe3QHT/VPlXNLnUIm+fdt07y9j4eph9flnUD/xyjGuIxGc8rme7+ZJP3jTo6sj53cw782kWyuYZEdCz1NkrBWGW0Bs1ujoi9s5ifKcrTSlKziRYpDoXKy2oBVGoaeQhTuI6lluRq7hLdgvdN78RICouuOr4baFzKAdLd6eKQFBUIlV6qN1CQ==; 20:eQt5sJ4txE61wUh7PvKesT5Mjbhq/jB1MpM+32wP4vl8YK3AIsH6B5JFoMmH1EhBTb4OU1I8HyPjZC63cB3tO/QGua7SsP6uPLgBjTjvIQhv7g4EPhfX540Uj0Pj8x6AzHF3t/xg3ffGhihmmnIUNEf13Y2WhcAC9V1N/KNaqrE= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2017 23:49:04.8251 (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: MWHPR04MB0513 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 Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Cc: Andy Grover Cc: David Disseldorp --- 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 cfe69c1fc879..c28e3b58150b 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -3130,6 +3130,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 33d2e3e5773c..77a6cebf5a8a 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 *);