From patchwork Tue Apr 11 20:58:42 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: 9676071 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 66DF7600CB for ; Tue, 11 Apr 2017 20:59:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C46226E96 for ; Tue, 11 Apr 2017 20:59:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 50C632852D; Tue, 11 Apr 2017 20:59:04 +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=unavailable 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 E656526E96 for ; Tue, 11 Apr 2017 20:59:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753622AbdDKU7D (ORCPT ); Tue, 11 Apr 2017 16:59:03 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:46455 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752951AbdDKU67 (ORCPT ); Tue, 11 Apr 2017 16:58:59 -0400 X-IronPort-AV: E=Sophos;i="5.37,187,1488816000"; d="scan'208";a="112240924" Received: from mail-cys01nam02lp0054.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([207.46.163.54]) by ob1.hgst.iphmx.com with ESMTP; 12 Apr 2017 04:58:52 +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=WUqFxDJGrH1gAmz5WdaVkP4tAyIa2GFhHouLGovD8Sk=; b=n/bbEfIpKeagO+M+u7zYezQKNypCsUgV4dLEYg3MGpC4c9yNdrm+X5rtSmqGNmqhtA3slUAumeCg8AUXYj42ieTaKTGNJQc1U+BmNV4KcCtf/T98F5LgHi8EwVv7XfIYFZWK2zi1wZoFgr3gThLU0n4tUzXQRafez91MRUQ785k= Received: from CO2PR04CA036.namprd04.prod.outlook.com (10.141.240.164) by CO1PR04MB394.namprd04.prod.outlook.com (10.141.75.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Tue, 11 Apr 2017 20:58:49 +0000 Received: from SN1NAM04FT052.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::205) by CO2PR04CA036.outlook.office365.com (2a01:111:e400:1428::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17 via Frontend Transport; Tue, 11 Apr 2017 20:58:49 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; suse.com; dkim=none (message not signed) header.d=none;suse.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 SN1NAM04FT052.mail.protection.outlook.com (10.152.89.62) 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; Tue, 11 Apr 2017 20:58:47 +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 C7.F1.19026.7834DE85; Tue, 11 Apr 2017 13:58:47 -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; Tue, 11 Apr 2017 13:58:45 -0700 X-AuditID: 0ac94371-41ba798000004a52-c8-58ed4387bab2 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 39.2D.11415.5834DE85; Tue, 11 Apr 2017 13:58:45 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Bart Van Assche , "Martin K . Petersen" , James Bottomley , Omar Sandoval , Hannes Reinecke , Subject: [PATCH 6/6] scsi: Implement blk_mq_ops.show_rq() Date: Tue, 11 Apr 2017 13:58:42 -0700 Message-ID: <20170411205842.28137-7-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170411205842.28137-1-bart.vanassche@sandisk.com> References: <20170411205842.28137-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLLMWRmVeSWpSXmKPExsXCddJ5kW6789sIg3PHJC1W3+1ns1jwZi+b xcZ+Dou9t7Qtuq/vYLNYfvwfk8Xhe1dZHNg9Jja/Y/eYNukUm8fls6UeH5/eYvFYv+Uqi8fn TXIBbFFcNimpOZllqUX6dglcGU8+nWUv6BGs6Hh1hrGBcRpfFyMnh4SAicTkvi2MXYxcHEIC S5kk/v1ZyQbhbGOU2DjnPitM1cO2VqjEZkaJFS9usYMk2ASMJL69n8kCYosIKEj0/Abp5uRg FljMJHHxaQaILSxgKTHn4A+wQSwCqhI3jsxgBrF5Bewlfh//wQyxQF5i0aYZYHM4BRwk+i// ArOFgGpWHL3CArJYQmAZq8TKRx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edMessage: 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)(39450400003)(39850400002)(39860400002)(39410400002)(39400400002)(39840400002)(2980300002)(438002)(189002)(199003)(9170700003)(2950100002)(6666003)(106466001)(305945005)(5003940100001)(5660300001)(4326008)(38730400002)(356003)(110136004)(36756003)(53936002)(54906002)(77096006)(6916009)(8936002)(81166006)(8676002)(48376002)(47776003)(50466002)(86362001)(189998001)(1076002)(33646002)(76176999)(50226002)(50986999)(2906002); DIR:OUT; SFP:1102; SCL:1; SRVR:CO1PR04MB394; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT052; 1:o4LX+MF7W9FFd2zZgk0GwrMBB491powVGmVB+ArXXGPUB/wGyDQTgjn7jvrloDa695fcyVKppJYKniQZx1A50QENI7dhoWYqFRvp5UCiTNG+tBQylJ+wtUexYH/UXMmLNPH/jGbm5c7bE2bg1P5A/U17+OPU8OxQkN4pQr61IY86oaCt+4Xp+MYIayEwL0s41xwhgECWXprlug2kCDwQgBMcnA5GyGLAnRyklBuIJzI6YjcvsyGcT9A5GHzuv8ZHBB0nQV1TNti18QZziTiSNYj+OzkZNsnW6nsF7C+y6JyjgatQOLTKHQsaXwtsGzWl1ubfJHmzSSFTpibfT7+8g57oxGZ23WLJTChInB7acgfoVVORfhIKh2Ao/Hbx9Z1QfHJGQiWIf2ifPj4186CrnYGWF74yrIT3t0S4NebeJ2fyle8/dYUOidnqswzzF9bLO6Wozm8BMPSE4Fj/S0N5UMvGfD4e77JrqsWJtYSaBWIBRREaNfc/11HmAwtEDvRUvEx7g7q2VzqIvtXg/y2FfCMONPiuiah+Rxzp35kEDMo= X-MS-Office365-Filtering-Correlation-Id: f3246594-1883-4375-19ac-08d4811d8d2f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:CO1PR04MB394; X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB394; 3:BRbeKDvuojxhE0T4LMc9OwiNlMPLsfZE9hL+lrfpg1VNZ7wiosSKhlmwfvnqk+apUMgudF+gEEacKQGtHlzjewShbes69Ui1Q18UEuqSp9K1sd7Q20LYEPBb4GHrSFfnpH9ntEUJ4Na2HjSt9INcJquUsJPgLO5GUAaNhmy2ESCIYpSE+5CIXZcRSs4aI2UWi77RPto0WqsEfIhpB7arU2YFZ8675PI5DksoZABg1BiD2nNbu9gVMLjW1AbNkcK2XTkO7hk+ShAJ9igaZEydeaVxEokQ4wyHAyOFA3sr9De2hc/AKUdcjIkgC7jZMKxXQqGhZ/UMbysCbu4qOLK3Ujx1a/LH0zFcHxODE0BE56XBG7s9EqDBeiRqMyJ15lr0qBb9ah6k6NLusMuoZXx3RnAjCOutgsItq+iuSxrpqbLPa5C48ecuJhQY6jMUbju636cC6nbrbxbQT84dnYf/JWqQPFZf7wjkcyCzjc6O6hRH/gxmbWGa5pQj3/YxtMs+ X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB394; 25:ZofhfGX9tPNmP0sqnVamlQwscTsT3O+fCCgwJobRvK3SreUI/AxZDNZVx5XaC25G5/f7RXE2rXoN1PycT8VLbpuLcxnrIJOxutQlA32kltHHUdIDngXPbA5ZI9rJegmUmwqtWhwkzNw9i4nuu6gbpAOv3GmxykTggZlTeVPiZ/L6wGf+fJZBCFFLR6u+MZbB+mnOguOK+JMBMRhrKmU+KEExikqNJuwT/jvZ3JcO7goa1jQ99ssAjFH4UQ8RDC2NrbSy07Uif9LebQPIx/cq/ybUB34ClHTYsRyKNk68Gyjswij/+Hb0mj8acMjIMGdHRRvyW11FchZ/JKE1nr/G/YQMCYORvbLhhq+fLqsnV224qraUBgdZx9gn5MdkmXVr9IM1ME4t3/FsvSg1zE1ziKWMs40h9UoZGTEaFWAKdYhzBFE5kdduIX7CpSjxm5wYJioM+TiJxXqSqRhd1+B8HA==; 31:cwfrQFFPajGVFVNrKTqGrkGi7tqryNyGtcUuVObEXMWR6/LgSDoCZhUmpViigVMFnrmihLpwJRnhO1xiDnbgk9ZUyIYQLdE3ZwdlXghCu7isfXAc5+sEk1QMBgm4mpIpWfl2giiANHj0DzR4aJAFLiYnzpn/VR72tFZbyNuxwUkaki18BP3KRBWtwlmOZ2OmtDfu3s4K4HFuTMKE1Kw0eACP1jg0aObhb6FhKHLDUrJlBaccIaaLWwA9pF7Dl8GC+ywAbvhsXtsFJexmeyPXBzkJJS2MxmtE3RSDp90tkpA= WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB394; 20:w2XsI66p/GZVb166Ayako/8uxo53Yb5U9dsPsWZ1W/RXOEMMyt+F5OtKKv+OXIEt207ITmmVRcQKNyyy4JgP12xWItn99slSNLOjegVoD+4vVWe1vSz5cFy6UL2YqnR2856w2FPow0w/m4gV9vBcRjckguy1iDcnNfecQMFGxFrDkHcIKOYcPrIH7rTSvnYhLPv5qncOzPQXrNAe8pfr2oxvUt0CODmis0ATfKYJ14TJEpw7ev6gXH9mZAtz/ztUUbbucpVIVfw0aAglc0kFH3C62zQu7nvm1nj2BYyOKqcxe8910ro4bEfjb7foHrEIRDqJ0oq9Z6fRsAHEWiMVDbD/u+j/KBOJtewyT0pLl4PSE7AVFzflBC5JmvZdRJt+etTQWzYqC6IyOF+Ae1IiIw1KyxyyggeiuESeOTOGuzTiHjdWWQNT7B+eh8qFBbBet9Jt/moUFp80JY3LtYjrLFp2rtUzVUaQlId4ziy9ptV15xkH6SMn97kp+P3hvWIM 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)(13016025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93004095)(6055026)(6041248)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(6072148); SRVR:CO1PR04MB394; BCL:0; PCL:0; RULEID:; SRVR:CO1PR04MB394; X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB394; 4:J1JmFaes+yYcAJpUptof179lV52aMk2a3/N7+6tPkFfXSGjJaeJw9UuDVXl9F7Kj5ij5YQX81wOzMloED5Eoy7mYf3urt7PaC5/rQda6Q0Vnljoxpzwt0Ai8GmEPZeNaCLyvnsFxwxUeBNlXDffnrOSqgrWKqofA7BfUanhRhSaOstNawC0AzaHTkIWRNWgIF8ychgVtuhgVCj0RIkABnanU9pEQjH+PClsF5K8W66q64FVahZAATCVXv3mLPEces1nHICD2D1V1oe0na976kTQo/i6VAWjiwalA7slsZNGA3Z5w/ys6sl0tzlkGzgttF3nJXjjROfr2Gzp4YGeGT13cBspZlqjpDg7BSimzBZ81WJLIVnDDy26VZUekk1e7CGTQlrKoZv1h9rU+jata3cGwIf/MppMZX5PCqRyi9/FxjphYfr1pS0t40DMsf8ThrBbib5PzwIsABpN8k+e2nX3WSuJX8qzRPd/FErNUbkb6XBzceZItP/HL9jyW0gChcW0BYs/XtIZZQSpvtuUfHfazMuRsvUzK8tfaNAbLwMKN6iaX0nTygwoAvHyGc/W3Mwll2oYpasAgO6BVkfJUWTHRlgCoyGsNKHHmV/r/ENrwI4vy215JlvXpKAZid/EQCTX14vsuyvhv3qQA5pU7buijjfrQhnoBLLfz5saMAgBpTxJU5JzwlrEDGQeJqgfo9mc18XWh/DyBHu5wi/8p5kUxq16QZsrZrW+kbfzqH1hYQ9TwxxrBsgF9PTHCNUZOmEQhRrbHWU2Vl9jA8zwrkOHZOhN9YEAXblYHw1PJ65iHQETJ0LZQ/nI9JE/FUuWP4pB+1Y1PigmqKKFmQkONtxWQ95EPfxT4JhIrNGSgJr6FT4+HzvGKUq3s7lO5Jn52A2hODn7UhKH6cdVJFz/n69QPbFYSpO4/5PNSiH2sHZI = X-Forefront-PRVS: 0274272F87 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO1PR04MB394; 23:Nc2KdiEgg/tcarRr00V5zh6ABxf0799Z1D3SXVX/YV?= =?us-ascii?Q?m9gMNOT3arvnwadTCRUhzHAN8DduDR1zofDkmz8Iwy9mcgbKjYze1jpx/cYA?= =?us-ascii?Q?a0/gl7XIGnUjxWVAWTBuZ9Do3Sk7GNQgkX5T1L6EShvF3bMAl4+83rBIrkqy?= =?us-ascii?Q?iX4yuBsqZHw/WK229Q3Qjskc9xy4osRHMKyk1oXmHrEilYNaRLE8QHUHRd4n?= =?us-ascii?Q?R/+8ozVB0WuVkJR4HpssXZU4gwCnCRyVoqojcY1TPO0zQrapJT0qdDGAztW/?= =?us-ascii?Q?M6X9iu4dgOLeSoRiFK/a9EKn/Wwa1CcMSGS1dn/wifejG7TeUmEjzTOzOUAx?= =?us-ascii?Q?P4u0KPx8PwUtzXhlYdoJFC8l+B1xEqc1hkt6YIsRzMgY4ukwWrIH7MXtUAJO?= =?us-ascii?Q?KmApv+byX8TE01F9MhsCC1ULSpPMmS0oQn29scxWrWvvCv4wFGULewLYgeib?= =?us-ascii?Q?3Y3mgJjR1e02w+QE7WIQbPvr8N+4NOPuTTdfZZV1B3hGRN4hZ54OEHS72neh?= =?us-ascii?Q?OeavQGiqCF5BxdNgCVQ5t2aRx4346sGKGIjLC4MaZBm3PjiFJ3QuDaf/wNnR?= =?us-ascii?Q?8vducoTA2tCawVaK/mJFaGuKXO18G6+XZvx+R1TlI+RLBN9bUi6A8oVbC9Os?= =?us-ascii?Q?tPJ10ejqP/c+5qsW9kjO32JrJEy5aCY76KVZtASAVdjZwfN1zfXmQLujRqM5?= =?us-ascii?Q?agtZ3br1RY8Q3l87hM1+lMbPp1YQQECJeSs7YZ6573Ptt2m0FbuRw40DdJjG?= =?us-ascii?Q?Mif8xEnfcybs6o5N5DFfWKTn8e7grZF1GwqKZfghNPMeHiLY0Ee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EgM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB394; 7:ebAU9fHi8+3TC98fFV0/6YhKjwXmsdP1CsN6tkFs0BQm14BlZwB5acPAuNKLKyymoaZ7ACpq4c3a+734LaeZwK6/vCVIMHnj5HMVI2yMp3vwSQI8z+V4QSZcjmJr6R415XTq4Mp6qX2hzB9hjJp4bh2r184aB5SOUXJJkHwaQLZ//yV3b4/ZuyNAvLuh7YehyrTvhsLaiXE7HtEj2XEQyF7k7YevWMs/V8yML3eptYwA2ImSKugAES+Vrl8Mqu+G4flWjYj3GGRSJ1oJmtXLhVmpgPIWzq01Ygk8CFJD0QipbVG8cGc8xqC8vmosFWr/jWik6bn3H+VJHdHHaFG5RQ==; 20:RVFtJGZMQRkaPzx02aGK03YHR9vPToi3TX128FsEzMpk9JqdR69W2Lfuo9IRSitAcpsTAvEyg+Oor5oGkVQrVqejN4qBPeiF+ku+ohIudg0Y6gG5vOo1XoYYgQUHwtsmcYL/jxbN5slDIp5+znITKz1MH5in5xxPNBvR2fK8N9k= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2017 20:58:47.9088 (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: CO1PR04MB394 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 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 7bc4513bf4e4..7d3efb8924ee 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2126,6 +2126,32 @@ 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 request *rq, char *info, unsigned int info_sz) +{ + char *p = info, *const end = info + info_sz; + struct scsi_cmnd *cmd = container_of(scsi_req(rq), typeof(*cmd), req); + unsigned int i; + + p += scnprintf(p, end - p, ".cmd ="); + for (i = 0; i < cmd->cmd_len; i++) + p += scnprintf(p, end - p, " %02x", cmd->cmnd[i]); + p += scnprintf(p, end - p, ", .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]) + p += scnprintf(p, end - p, " %s", ehflag_name[i]); + else + p += scnprintf(p, end - p, " %d", i); + } + p += scnprintf(p, end - p, ", .result = %#06x", cmd->result); +} + struct request_queue *scsi_alloc_queue(struct scsi_device *sdev) { struct Scsi_Host *shost = sdev->host; @@ -2158,6 +2184,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,