From patchwork Mon Apr 17 16:56:51 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: 9683971 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 58C95600F6 for ; Mon, 17 Apr 2017 16:57:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 486EF1FE84 for ; Mon, 17 Apr 2017 16:57:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C0AC20009; Mon, 17 Apr 2017 16:57:37 +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 66A921FE84 for ; Mon, 17 Apr 2017 16:57:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756218AbdDQQ5f (ORCPT ); Mon, 17 Apr 2017 12:57:35 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:8251 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756099AbdDQQ5d (ORCPT ); Mon, 17 Apr 2017 12:57:33 -0400 X-IronPort-AV: E=Sophos;i="5.37,215,1488816000"; d="scan'208";a="107598340" Received: from mail-co1nam03lp0021.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) ([216.32.181.21]) by ob1.hgst.iphmx.com with ESMTP; 18 Apr 2017 01:12:30 +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=ufTR1UKmlk0vbsCkRQ5hmQW1+nh4Wg8elhg9gdSobmw=; b=LRMuufoM6KnL7hb3db9WMFvXPO7TwAKUyQUH9CfHHX31mhh0w2ULTilMhOiTQquoex9yCVaadZJ0S7PqXRKAAvHdL2U39SS976D2/NFlhiUkRo6FLmcGbmpF9vWu8onNJZ+9kOSezg3CrXTwD6o+glAFOQcUzT58ZpYrspPfddk= Received: from BLUPR0401CA0016.namprd04.prod.outlook.com (10.162.114.154) by CO2PR04MB2230.namprd04.prod.outlook.com (10.166.94.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Mon, 17 Apr 2017 16:57:01 +0000 Received: from CO1NAM04FT023.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::207) by BLUPR0401CA0016.outlook.office365.com (2a01:111:e400:525a::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10 via Frontend Transport; Mon, 17 Apr 2017 16:57:01 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; HansenPartnership.com; dkim=none (message not signed) header.d=none; HansenPartnership.com; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by CO1NAM04FT023.mail.protection.outlook.com (10.152.90.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1019.14 via Frontend Transport; Mon, 17 Apr 2017 16:57:00 +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 03.4E.19026.AD3F4F85; Mon, 17 Apr 2017 09:56:58 -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; Mon, 17 Apr 2017 09:56:54 -0700 X-AuditID: 0ac94371-41ba798000004a52-f0-58f4f3dae235 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 82.D9.11415.6D3F4F85; Mon, 17 Apr 2017 09:56:54 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Bart Van Assche , "Martin K . Petersen" , James Bottomley , Omar Sandoval , Hannes Reinecke , Subject: [PATCH v2 8/8] scsi: Implement blk_mq_ops.show_rq() Date: Mon, 17 Apr 2017 09:56:51 -0700 Message-ID: <20170417165651.12693-9-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170417165651.12693-1-bart.vanassche@sandisk.com> References: <20170417165651.12693-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLLMWRmVeSWpSXmKPExsXCddJ5ke6tz18iDJbsVLRYfbefzWLBm71s Fhv7OSz23tK26L6+g81i+fF/TBaH711lcWD3mNj8jt1j2qRTbB6Xz5Z6fHx6i8Vj/ZarLB6f N8kFsEVx2aSk5mSWpRbp2yVwZXzZ+IKt4C9/xaVVTYwNjJt4uxg5OSQETCR2L/jG2MXIxSEk sJRJ4vvm/6wQzg5GiWsdq9hhqjat38IEkdjIKPFv81ZWkASbgJHEt/czWUBsEQEFiZ7fK9lA bGaBxUwSF59mgNjCAjYSBy8eYgSxWQRUJV78vAJm8wrYS3R2/GOEWCAvcXbLTmYQm1PAQaL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gAKbX5/zwEAAA== MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39850400002)(39450400003)(39840400002)(39860400002)(39400400002)(2980300002)(438002)(199003)(189002)(9170700003)(77096006)(2906002)(54906002)(50986999)(76176999)(53936002)(6916009)(2950100002)(6666003)(81166006)(8676002)(1076002)(106466001)(189998001)(48376002)(356003)(50226002)(4326008)(8936002)(50466002)(47776003)(110136004)(38730400002)(305945005)(5660300001)(36756003)(86362001)(33646002); DIR:OUT; SFP:1102; SCL:1; SRVR:CO2PR04MB2230; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT023; 1:PstDMK4QqZr74U26qx0wZpG3uVgcoIbJ9tg2wCs1lPaREAD6C6YwNPFJtMDUnBZbFF07RhReuSVLgZ7imdHux5eTLPm0lAPGpDwH5gY1Sinz6Q1pv6bM7ILgSv26ylbfsys4MSuxxKmern6oIYpwFjS9J3HAhuvc/Q2n7xZh33jJQlAQNxIYzRweGBlnyfc+wxVDLYCpUCF/ARcnjD06xoiQlVtmnfhF8/dBRwf15gd8f3K4/11NVjTvZkoQtxbVqFuzjPpqGwpWZ54TsGYNqnHdZ4t+RyDCDNVD2qflh5+RsAlg7N9PfAjQM7bDngbo/rzLKkpmnH0tsGJbD4PQiQtzUjDEMT6OBdyBYDp/gtylp7G07Fjhy9NnkiyurGjOBugHZT4sL9Zy3iy6OncK1rQN3XDFANge4NHCNPa3piBxWo7QxzS5HIVvP4bhpuVl3kLUv8U5KIVq8hSmRHuWIA4212HRgNJ7t0/OjEXv0ieERCTjgd/HYF7mpYNz4m0Xgv3v1Ly0mxMmP8bQhTEfsz1x/db52lpyQhwLpZ9CMcQ= X-MS-Office365-Filtering-Correlation-Id: 9e392b92-e140-4663-6cd6-08d485b2c431 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:CO2PR04MB2230; X-Microsoft-Exchange-Diagnostics: 1; CO2PR04MB2230; 3:zbX8eji6HJpdKtDnM0dHoZ4/YBMnBDElRpfNjS9Gv3e8vic1BaUE3ApCr2giUI4m5hkdfzpoTaDWOtE6ZJDdzsgeCAyZ2xSwUHU2+3DGmIQtFTDD0Xo7BQpKuPH+RXReasoZ/osoZET3Z7hAHKJEuFzC1/vm48NfJAwvE/SJg2haltx8DEfM3WpXqbWxJeBMRkMy3vuUaG4Hhjw5FB/XJquz6pt+menwMvh1RNSoO+FxWwD2RCoNDKPZPO1yfnInthrkcywm6DrG18Dt26ix/gPOsNV5rENi1UJaUzaQkK9XLLJg7W6c9UMnEnbN1tnY12JUT/hdUx+mOYkBOzpGpVI7ThmIeVNRsicb3l0F0TcdZb9cJdgESGdKakphVbfgEwpg+T5ijcQ7BAhGIs4zX1phMwFgDVhIby3H8pGBVL6v/hO95wUXU9bTGKUxHRvpqWNhjT4KGvTLES43ny+W9/39FgHqas0vf59hGPnQndLGe10e0VolZf2lORe77di1 X-Microsoft-Exchange-Diagnostics: 1; CO2PR04MB2230; 25:XR1JUIqhY5/qTWjjWjnx4FKffESR18svAd+BY3cSKfomU1aDX+NUNRwvgG+RFwNGPAZoaDYO5eHM/U3kKGWXdedjnyBPQdjLlotRrXNrLKCk6Gh3b4bteKzFcdQo2lso8DPqmK0WrZtdNRrynFMVHoLk1vzh0QHB/wJWVHalctbDEXgEBb8GDudGoF4J1oAEELPgLa/aiFwpgJ/Q1RDlb4IrmdLkfymn9p0UM2cyTxNoKbT9yVOxw+taPwqqQvZc9lGvHnBnWV7uXs0nILJMR9G0/Ug/u/Hp6LdUoKhodASdFZXSzxMvWG4qTkWvI+dKNvM1TcRF0oMFqfsfm+QuAWnBA0MUsK4FLoklJbXfVnrBoSsF2hVX9wBT+COXRctC22w8Z9UTR0FhmLDjee3Pc6Q1yFhWak0KMExom+WcacWRIYVMVPg29FTq/SKVI/KzYgIK4xgVLT4VI6m/H6Bs9A==; 31:njBO5dQ9gksyXQkJaI8GCx4azAZtwA7XHRnrly33PwRemLQrzFvahxHFQRJpkWRjvIbtjGw/w8ZZp2SZbeLnwfu9ZgYhw6EDUZ+HjtCcTFCrwvc4HaAijRDLgwqcZyQvkCvDjh5xMxEwzG7JDjvxLkXetssA1R6T6ROTHXc2w+h1XHjbdBPDAbKS41nYycD85FK7PCTKU+PnDcqTW3YhvRnPRMCkFkT5LV/sau+MMjkSQAlxXQ5hQMXEQP8vX14KuVPlBfx1e1wYN7TnvCERAb2JLafcsqGmYHfJfyJKQbQ= WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CO2PR04MB2230; 20:DRTCK3k3DtqmDlw37y5LJ14eEl2H1Pk0oPknpsCZqgdUVGKf1LKuRc77UOV4i2TJun+AmjmlbswUp3tM0ODcHLyWBo+JphgCOzd2rFQ+WvAvX8NIhrJQ6uQDEd7k+E3ipH0qiQoVmhr4PZKVTjz/WygEmoMnr8Sdx6tYwSZ5k9HilzQ75hJbBzne+wnn6EDfrE421tqnN4KPO+RXxzvffX1aPjyJuqk+2ebz0R7Mz/4VWGMzy+xGz46b/IHKHbht8dBCsMqjwcHfGWPF0nLW6NcY/8GlT6SIp5KaoumvLxPsUN7gWoO1usS7BebvH0LUpF4+Jwr0mJId32gvW+W+g7+e3tOeZjhHgVyyqngQWxpF6/d0nCsF8Bg7GD6uIEvkDnEKQJiQgO3V2Y5BiUFEZQDUGMLhBOQkVnvhbJQv2tW8PLxHsVOPX8DmAYSwG+12ErkvMCmQQVUlyqF5DFbATO/gFn1hJiujcNfkEkLKGH3c14SpPTFhqGHPodloXqLV X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(67672495146484)(146099531331640)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13018025)(13016025)(5005006)(8121501046)(93006095)(93004095)(3002001)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(20161123562025)(20161123564025)(20161123560025)(6072148); SRVR:CO2PR04MB2230; BCL:0; PCL:0; RULEID:; SRVR:CO2PR04MB2230; X-Microsoft-Exchange-Diagnostics: 1; CO2PR04MB2230; 4:B1afQiQDS1M//hKPG6ziI2xRF5XhzuvJfD5NsrEb4PnM3AyF39vwYPI9eM+6Z4le7fSfL0w/th/Lm+PMU6MvlsO7PGNKvRLpDqMeXpInVvzlUU1WYJ8tPZRQk7QkBbwxY5YxgkNGjZsBap3FSFWQ7ZtEFUpacF1HZcCvDTANnHb1IFjzxOyeTCL4ubhjVuy85YxL8miCOlQy8bucglDHdNgVRFVb/r3BUGR+dtX795rcZcfwGyxE3gpXtxv1eD0dUuIhClH1gdkq4qOZj+2jrIFS2PiSumUmdR+jx4EMxn2xlDbUjt1Gmaj1DaN09zl7pVQGCYToDKMqL+ldyO2I0TBoZMkdl2hc4zmDvWYcIUfoWGAhvdhWoBxbMIgNgws0obdkItWVoHhprnsTIrkm54/v7NwcBOPneQVuaVfuRvJJhuPoucyucJxEiU6n3QdZ3Ay4zJ9k16PC0O5dOqEdH+zbqV9jzvaaG1IdhhfIN4Nn8vKnvAP5Ssi5u3zLS6efAOotqproeOhVEjEEwa4vpFqzVWr+irEoOTZdxJVogZNXnfOPxnlgvvIWjl2px8jJ5u+Vn+Skkpe1c8oZCsIczAodXVZS2/PpoGwrLSdXusoSckdsYrqog3HUv9cqnnRUr5+fTIsnrwo7rGjMQQwNrZz1FILTm1I67eVBnisgw+xlHb7n08KESakVk4TJXJhz7RVxK1igTb6O9XdQKCj3I0M2BF1zIsPmSFL4OmWTa7tZ/cnwFoi0QkUwl2qJwpXmTO1toITWl3jdA76NbR6Wf6BgsbLr47eqcKU2yinywxeXQXObd93Rr4ylTa2QfBRSXgUUFbG2B8SF/eOFptHZ5NtC7KmRjgPWT/3EgutHLC0aaI4rgs2H+cW0znBmhoTWXNmLBN/meu6gzIG+Ot58M1992SzL8UEG0x49MxTGTM E= X-Forefront-PRVS: 02801ACE41 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR04MB2230; 23:LwUHTxFS3h/KtNYNM38uDsSA6hbEsGZyc/T48aka1?= =?us-ascii?Q?//R3vMUXmRk4gk1/g49ISEpaHS6KDbajOgh44ctX0aFTHnSmCq+E7BwPuJ8y?= =?us-ascii?Q?ap2+5J5X+ZD3Uz0hb8S989WpJGk4SquVEIsnpSXVDpOCdqtXwSvX3J2du3PT?= =?us-ascii?Q?0NZW8zIS5HVeXCuUAE1Gtpz7lSRfkIegc8Kwe5wWxoptOx37RLDO5uc/Mn0K?= =?us-ascii?Q?5is+KZ6/MSZ0KbwADPEWlc79plA+d0xsxyImD6zxfXPxrZPekfErhEWeolu0?= =?us-ascii?Q?fBRBGkLTtmmYim6RUjjJ3g6E3vkCbGewH8bDI0O91JlctbeujZ6MU4Mx9dYM?= =?us-ascii?Q?sz2sXS0XdW5x3vUQPGFybop3Z1NjmuZXIAu6NRvavO/dyv3BKes8zv7VqwWF?= =?us-ascii?Q?KzpdV56aZToye/ZtGcSeTlOJRaoBdbD743CmUarQ0Cn1YrJtMmCoShPx81JL?= =?us-ascii?Q?+vpk5uEZQAA3hrc+0NBYEFA/WvVgkwf/U1ExHCKfxNmYJQN6zsi6iRZOydlK?= =?us-ascii?Q?cpTafKjFgoKRVzr6WB9wOQKo/LWUZkHovNJccfdAEwggt5L2oiFzsB4sU7iD?= =?us-ascii?Q?rYZ+o1Hqm7Klt+vslwVFIK63D7M5n/ag6qdcR2JF1Iw5ELXCSRwEdvfqbdV4?= =?us-ascii?Q?1pC0X98ximp9yxHCO/2i59sXOYKU8iQbxqFp936yXoOdtpwPWKTUN2VmY7bi?= =?us-ascii?Q?rbUtmtU8hAnxnpMTFUILI/RUGBzBXPZaB9fnsMwY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Z4WVWs4Fqj0KAqPlCEusQU0Pr8E+exE5sht7ienxiaR+5YYT4yzqJm9MvDSCbDSBr2lP/A= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO2PR04MB2230; 7:i63KpNJO6jww9ibqIOUQfHqILgLSghiiJr036iibhrF3opv1ldkN4I9MHSsre+dllvDKfKLoORKAS719hyN9kuYzVunSZOuFYm3dTuNK8XGyXEz51VLlnCGl/ePEGkygbGjA7R8sNnFzOC2bBysSpT1KQmWHvN9CqFHD8Cx8xhU6fjgEOSDCUjGguhJ8mKW5cmqgSnpzcEeGY5FMGwbStvTRkY4N7KHyCgi0QT3DXkmwFQwA8xokuADph8AlhYcbmW/MfHWnH13cx2GdFnDcOAsOWOZUbtrMh/7XbPhWNvEjEqQObfyrXnnYbZQJPS1fd7WdUKxmrrPVA+sIbe7v7A==; 20:1YhifnUIIyk3eGNpOes9h0CUyYo/0hd7lf5rMnGgieDiU8FXUZLgdJJ2TI6JgmFxwyu6SKPg8G6KwTT3W+sx2086ZTaby2sgh6r0H4KOfRMlNN5+cmrlwMAPgepXGjAj4QinIoric7A3RGi5UaK8IURIAlUxgzBGp6An6jV5D8k= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2017 16:57:00.3953 (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.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR04MB2230 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 Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list. Signed-off-by: Bart Van Assche Cc: Martin K. Petersen Cc: James Bottomley Cc: Omar Sandoval Cc: Hannes Reinecke Cc: --- drivers/scsi/scsi_lib.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 7bc4513bf4e4..52604573e4b6 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2126,6 +2126,31 @@ static void scsi_exit_rq(struct request_queue *q, struct request *rq) scsi_free_sense_buffer(shost, cmd->sense_buffer); } +static const char *const ehflag_name[] = { + [ilog2(SCSI_EH_CANCEL_CMD)] = "CANCEL_CMD", + [ilog2(SCSI_EH_ABORT_SCHEDULED)] = "ABORT_SCHEDULED", +}; + +static void scsi_show_rq(struct seq_file *m, struct request *rq) +{ + struct scsi_cmnd *cmd = container_of(scsi_req(rq), typeof(*cmd), req); + unsigned int i; + + seq_puts(m, ", .cmd ="); + for (i = 0; i < cmd->cmd_len; i++) + seq_printf(m, " %02x", cmd->cmnd[i]); + seq_puts(m, ", .eh_eflags ="); + for (i = 0; i < sizeof(cmd->eh_eflags) * BITS_PER_BYTE; i++) { + if (!(cmd->eh_eflags & BIT(i))) + continue; + if (i < ARRAY_SIZE(ehflag_name) && ehflag_name[i]) + seq_printf(m, " %s", ehflag_name[i]); + else + seq_printf(m, " %d", i); + } + seq_printf(m, ", .result = %#06x", cmd->result); +} + struct request_queue *scsi_alloc_queue(struct scsi_device *sdev) { struct Scsi_Host *shost = sdev->host; @@ -2158,6 +2183,7 @@ static const struct blk_mq_ops scsi_mq_ops = { .queue_rq = scsi_queue_rq, .complete = scsi_softirq_done, .timeout = scsi_timeout, + .show_rq = scsi_show_rq, .init_request = scsi_init_request, .exit_request = scsi_exit_request, .map_queues = scsi_map_queues,