From patchwork Mon Apr 3 23:22:27 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: 9660701 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 4490A6032D for ; Mon, 3 Apr 2017 23:22:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35E2C2846D for ; Mon, 3 Apr 2017 23:22:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28BC2284BA; Mon, 3 Apr 2017 23:22:45 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 AF1462846D for ; Mon, 3 Apr 2017 23:22:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845AbdDCXWo (ORCPT ); Mon, 3 Apr 2017 19:22:44 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:24170 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751754AbdDCXWk (ORCPT ); Mon, 3 Apr 2017 19:22:40 -0400 X-IronPort-AV: E=Sophos;i="5.35,258,1483977600"; d="scan'208";a="110337136" Received: from mail-dm3nam03lp0021.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([207.46.163.21]) by ob1.hgst.iphmx.com with ESMTP; 04 Apr 2017 07:22:38 +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=15sZRwUvq2Q6rzA6ZsTtx++V8y77N0btZK3OyROvqFg=; b=Fzf1KMyMEClcppBcfQsHagQF2BPOZxvGQqBbc1v+//F5ItNNw2NTrI+VNnS0t8Q5jGkZG8qMsq88fTFB9T2ZDJmtRdajVW0Uu5E+E03jtuq+o6pZLBSccXPleqgCgh/gLV7Ft5In1g0+83fJaoni/oCvWbUuaU3DYx+gCKEUnLM= Received: from BN6PR04CA0006.namprd04.prod.outlook.com (10.172.194.16) by BY2PR04MB110.namprd04.prod.outlook.com (10.242.37.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10; Mon, 3 Apr 2017 23:22:35 +0000 Received: from SN1NAM04FT059.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::207) by BN6PR04CA0006.outlook.office365.com (2603:10b6:404:cb::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.10 via Frontend Transport; Mon, 3 Apr 2017 23:22:35 +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 SN1NAM04FT059.mail.protection.outlook.com (10.152.89.239) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1005.5 via Frontend Transport; Mon, 3 Apr 2017 23:22:34 +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 DC.D0.29323.839D2E85; Mon, 3 Apr 2017 16:22:32 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Mon, 3 Apr 2017 16:22:30 -0700 X-AuditID: 0ac94369-548749800000728b-2d-58e2d9387173 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 0B.C4.11415.639D2E85; Mon, 3 Apr 2017 16:22:30 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , "Martin K . Petersen" , James Bottomley , Bart Van Assche , Christoph Hellwig , Hannes Reinecke Subject: [PATCH v2 4/5] scsi: Add scsi_restart_hctx() Date: Mon, 3 Apr 2017 16:22:27 -0700 Message-ID: <20170403232228.11208-5-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170403232228.11208-1-bart.vanassche@sandisk.com> References: <20170403232228.11208-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOLMWRmVeSWpSXmKPExsXCddJ5ka7FzUcRBkseaFusvtvPZrHgzV42 i5WrjzJZbOznsNh7S9ti+fF/TA5sHtMmnWLzuHy21GP3zQY2j49Pb7F4rN9ylcXj8ya5ALYo LpuU1JzMstQifbsEroy1+34zFpzjqZj08Rh7A+MZri5GTg4JAROJ7u/vmLsYuTiEBJYySRyd cx3K2coo8X1FP1sXIwdY1dQjjhDxjYwSb2ZtZQLpZhMwkvj2fiYLiC0ioCDR83slG0gRs0Ar k8Tqia3sIAlhAVOJY+/mMIPYLAIqErcOdbKB2LwC9hJHnz5lhjhDXmLRphksIMs4BRwk7uzK AAkLAZXs79sFdpCEwCJWie+7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 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)(39410400002)(39400400002)(39860400002)(39840400002)(39850400002)(39450400003)(2980300002)(438002)(189002)(199003)(9170700003)(54906002)(4326008)(77096006)(1076002)(50466002)(48376002)(36756003)(2950100002)(5003940100001)(8676002)(81166006)(6916009)(6666003)(38730400002)(110136004)(106466001)(356003)(2906002)(189998001)(8936002)(33646002)(305945005)(50986999)(5660300001)(76176999)(86362001)(50226002)(53936002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR04MB110; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT059; 1:L3Qx86/0xnCo5aoAfhZfpCiX57BuHHK8x2nuywi+jMeHUTy2UYNdg2PNgJWPMefUZgvrqDkxE5u/i3jREdCy6DWanzbSDXcwBEKQk2Eo3I8AKAF9Rue2fmOWoBRNXDykJWFA8baLeIum92y67HnmaLZYVZlgTdd/6b8/EXKWgf42wvxI5K8g0Q7fMuVTfWyHtePgoxzpVniHLynG0LaErFLQ/Ht8q/Dti9Vt6L3mcqmTidAF0TBsjldheJZOcLsipii7Zm7UayOaCGVATVBaUuSqYCgMWON9vdJ0icDey3LBAq5RyBTMODOZ1uLTFBkFV6gP8GNiydqx1LYId0Sq5QgSXw7G4FbFQPgjAXYWib2Zvc04OxTUuSFiupLeI85dnZQY9botI/HkN2eGTGl3Rec9HpkgUppoGUL79/3QW2rilWu/TsuiItMvxBbV00mC6gLVfipjQ5JATDlHCNlS8c0y0gkV0HLjqPPG6ggSVWoJFsolHDjNzWLdNfztAPHE1C1O9TVn6R8bWxeigWCFzMZMKh+4eYEAGxeOQQkB1ww= X-MS-Office365-Filtering-Correlation-Id: 46aac745-c2c9-4cb7-0a3e-08d47ae84fc9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BY2PR04MB110; X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB110; 3:UfUx/ALgdwX8G6vVdWrpsYQJ/bKaDsT032MtWEKMfWrEHsmrTFMukUMH/gLm4wHuVkcM8kyxycW+HpbP6nPdSMXjK0RV+c9qaz/G8GkNespIawl/WL+AcDwVKmmYQrWtKrxiqsbL/OSQyuFZb6u28XvAv4jRpIMVxCLrDbK5DKxWTMSi6zzk9waaqamyM4EXlQZLjRxBosC6c6C2P0UwUSGjo67YdK8+O9hjxksIy14kYu5udCaxbAWlnGfjUK9Tqnw8/yUIVqJRf6j4UyPpZCLr07le2DQHpkzwpBrYTETtH3dqzZWhpg2H/XEq1K8h6zGNBC7OHuyDK6dxqrzkDw2Ey66LqNTCg5Jx9mErU8/KRaSh6b95tNOvzh8hI1uSIWt+CVPgre3+P03vDn5IQQTDuVr5Xr3ZSGpZ5Ctbnm0fFBU2h2lC6PQSFZH44UNkFDoEmBn405ZLSk7OEUPHPgg6kVdQHlEylRWgd9vTFHAkqEi3C6KkLI096ViIaFUT X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB110; 25:0ZHuasdtkejYNwa+im4Dk8IFbOzq797TzEV+2dm+igcTBRHjW6mwWbukX2f9Sedq18ED3cKe4qEYFh1EkOnACLGnJvPYcRS3HqMuj0GUZ7TOHKYXZP64fsAcV0DMqdE4Q2QjzrMQDXSeQGn/V+l+pyTSPPWODB9Qnc0wWxprJIk+qXQ6+XmFvvnVJhFw0g62ywLEdr1fj33Lz77KzhlpclVWdY233dG+lN8LesoDae3ijF2IRX0SlYctIMR63c8YpnLdnKJnltYQIIoDR9/J10POzPZbUPuoglTqN41sHrSolGjs6l+Nhqmd9vzFOD9MVyJzdhYy0RW99R8ssR3wPEYwWgwcFhdYco+sdgxW4R/bGiviNEtIrvZIACqlwmm1ao5gi5Dfl9b3oV6vugwFYkfrql9s4TR5pzA0MQNyVg+GBf/1rpbVYacaIGZnk7gAADtmypk/xGHARcoVDixu8A==; 31:atDD1xNeJzN+v/sNwiRFzfVcC03dJFzRtVFYolfefI7v/2uN5qLY0A2Y/iZzWwMLGum+Y0HGltQZFSM91RiVDQZIgsov8JyuSL4Sr5IOihCTIDC3cx3T26i1Jcm/6uvcbemQxUdBayo5aTi2eS8DQ2rxKJ9wrLsEO16GMLYu5fRzx1butQh8Hb4oWQV6Cu44d/9nNc8kphAQkZdwTeIqWeg47Hdw3gFgdeNkKTI5wLANT370nPU5XRNF4Bdl/z1y4PHbwKGJ0Uj+ElwGU8cS/g== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB110; 20:Jo0sgfwAtMc+OXzWB7ZNbKZm0/1TGmCIbw4DkIQmCy8gFIEjZAQ4B740Sr0tXKWi15s//hxQkCuzAIINUwZe6r2E+r1zvUV+DJRpAmT7BXOr1494bUmA3KOcViN1JuNWtUj24sqYf/sMLfbsaruCAQ66AR1OgRZvINiQ3i3uOmLcIG3XuOG0Z00MZaALZFn8tpixk2hCJbIEEBd5jrWrue4y5QP2Hku8NR8AM0zTgu8sWxIwQ+h8X42kth6lJeDjcqQoPOcFG6Ju2JkcFby9PHUCvphYT2uEhXq2xIo28n27nadnQq096zdgGivn48W6wgCCnWuXuUsK8vRJfO6qyOR9QwHX2N6aPQl81QUwGjTQdVNVeVNn1sY1Qo7ysFrhpmDFHrnHW49iuP612Pg3uCstDwXycG/j23kBwhd1hWVbEhxh1gN/L413+6w5VPkBmoexMDIb3xmtlBap1fc9Dgaa29MwhTE9lDEs+YRLzAzzck5NDQ4E8EyUqhMyNrXo X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(146099531331640)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(13016025)(8121501046)(5005006)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123562025)(20161123555025)(20161123564025)(6072148); SRVR:BY2PR04MB110; BCL:0; PCL:0; RULEID:; SRVR:BY2PR04MB110; X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB110; 4:N1DSt13M3O1JhnVgXKxUzsm9u6Qf5SsEASKI4SMoQar5HZ4r47BXL0vnfcL9oulGqVw6E/WMx0sITnuh4/pAFcbeJMUjlQnVR8yFr+yoMW+394iT3YmVfhTwUxeZskVnkARpI1uevMOSr7tZIsqrEedPQEJJKJSXbLcR3/lhqfgo508cBa+AVtukLoYjEW2tO2cGlTTe71Iddo88yeA9CxZUW+WFZDz1oxa5vWgzx3bJwGS4hZ1YI7KqxoYha68ecYJ8dv1jedzCWWu91cL/ZibpI8/fxzI1b+uBngsGtHuMm1tJPQKR/ps1TUKq8mBwq8CkRZeh9AzHm2GWwUVoCuDEQfoyBgt2BFEiaMvR1iNs22Jw2q+VGZmYde8eMxMI5wu+A5YnT677f9RwWWt+YiFuKc9GBK9eHFUznN3Xye9upTU/7+VD8YpseJPfUw3xz6/JhR+UTIediJvxcG5iOPSoYvOEGbUhDAkl7vz1sBftpnjdviTk3kH+t9kUFeXFBA9NujzLjbovqhrKDk88RY0PthGZcOs8KyAoCHI8SWc5wntHejlQ5XW26pvAnHAwIB+LRkvI9akxkooMedpj0jFN13LrLZHE3o3UbovFdzV8mf4LrQa0gUmqo7BmdSHct317TD1s27bzuxvbPO25TDMDMWYf95lXXUsiBJBjGZTic7QA4V8lxWcX3GE2q/zLyrD0Q0TFwSzPANoeRYA/cJ2wwRUdr4ktH822PV0DjfQXAgRofDYZBuvpuxsHXHChpq4tBtpjTEbd9Cc4BK1OrDs9W7GpeOxeoAXtuSr0pxOgAmBrDBG8f6fx5tClDZVAZLxdYrBfJsiUyx7108Lp0xvAPD589zVfS7fXfcuPE5M= X-Forefront-PRVS: 0266491E90 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2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?= =?us-ascii?Q?rq2mA1/d7LbR+XujvgKYcItIUlAIeAG68b/D2ietsxkG0vnBztUYyjYlIKaB?= =?us-ascii?Q?IGNRg2aSF7hPJn+8rmZ1pduXjDh3j2enH/RwYN047KOKVxSdhu+UlbVsho3Q?= =?us-ascii?Q?SiMJdoRQgB6wbPS8Av4Elq?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB110; 6:KTzB10ZvXUaj9M7GgVuuJH+hUvXvsrj1nV07C3tIAho/TGD0XIXvdVSareo7A75xS+E7sQgLPWcSbS72/0L1H8rJPwVvZQ4C90oz7iZrvb/LKw5Yp+Rdf9NU3egpU0ib3u3oABsulaFU5FrYpSFd7VN+rcmgbzdRPUiznrSG9WrEn3CvWROv+GpdZH8ygn0deB5r9qGtmqeaPtcNL5oP5bAMTK8TYMyClwLq0Nlfep6cag9vBU+sT8UccaCzW/h8MArwuNEOOZ4JzIOyIsxduGO7yuBPpjXOLjaCnETh3Pe93vQ54/k9WPiiZrghyGaE4RvBKIKTJOsZIGUVlG7EyO6Pt5KtxbcLHoO4NPrZakrbII6r2YpoSOkXd31HRw3IbzYXt7FFY8RD8UeSEEEY0yPq+UPyu0QUXJDIKftxvm4=; 5:2yDCacV2PFwdbaY4aGrE+fdzebl6YrOaETrdRrjpLXMHjUwJhx9OEDpht9hFnDRKluB+YddGz15O6njIz13VirU5YTDw0xrKuC4cQQ8l/e7sa3CsmmPVWhnRQgKgrGC1drixKgV97+KpT5m21xQSdQ==; 24:S61oBFgtwe76J05MbyGl6e6PknfOQxqL7/QUj1zTBrNoj0ZEzEIIxSS34J6VX+KkXTf1JOcCYKz9vuQeW3nH1F1Hf4Cn/pjiFKvMNoxJJIY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB110; 7:DF774+Elnh2o0eaqJAU6Oz/N+waIhAwbA5TPsgAFK/m4GooxgxECugd2gHDql+yDzw0CHgwzkEwXKUfg2bNI7+iVN42xOeBqXI7ta3mxbI+TleXUlzMIcnSx/tss7EOaBtm40UM4DhI6unZL9T/RKwFDqTePslAWHsMurPpWBAfq+Wk16WlD1/J2gzpEIJjwrzM0tFP9ByK4ri78YhfFB7YpAsHHdIJ1XXAgu/5flatgt3pZsDoHLOEGbkhURJMfDQPUZ8cS/LkDqGZO2DhJgf2255oXZTTr5eMA/UxVYUkak7BrR5zdX0wVdMYaK8IXS1qkCIVnepg+Dj1ZsW7aFg==; 20:WGbSlC2QDrhmj2IrtY+/AR6CrpId54VAbu/yGgWX0+tQTLG6jlP75rm662WvmqgPbDvtUj7ACLgBu7u/UtDJP9edkRqugZlPdhCdOmnmj9TSec9hs1ayYXHFSBJYuTO/G7xteXTvF1AaUYsWTlFoaXpINH2VuRAGFgE+dXZU0iE= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2017 23:22:34.9565 (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: BY2PR04MB110 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch avoids that if multiple SCSI devices are associated with a SCSI host that a queue can get stuck if scsi_queue_rq() returns "busy". Signed-off-by: Bart Van Assche Cc: Martin K. Petersen Cc: James Bottomley Cc: Christoph Hellwig Cc: Hannes Reinecke --- drivers/scsi/scsi_lib.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index c1519660824b..0e240aebc150 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -555,6 +555,21 @@ void scsi_run_host_queues(struct Scsi_Host *shost) scsi_run_queue(sdev->request_queue); } +static void scsi_restart_hctx(struct request_queue *q, + struct blk_mq_hw_ctx *hctx) +{ + struct blk_mq_tags *tags = hctx->tags; + struct blk_mq_tag_set *set = q->tag_set; + int i; + + rcu_read_lock(); + list_for_each_entry_rcu(q, &set->tag_list, tag_set_list) + queue_for_each_hw_ctx(q, hctx, i) + if (hctx->tags == tags) + blk_mq_sched_restart_hctx(hctx); + rcu_read_unlock(); +} + static void scsi_uninit_cmd(struct scsi_cmnd *cmd) { if (!blk_rq_is_passthrough(cmd->request)) { @@ -2156,6 +2171,7 @@ struct request_queue *scsi_alloc_queue(struct scsi_device *sdev) static const struct blk_mq_ops scsi_mq_ops = { .queue_rq = scsi_queue_rq, + .restart_hctx = scsi_restart_hctx, .complete = scsi_softirq_done, .timeout = scsi_timeout, .init_request = scsi_init_request,