From patchwork Wed Apr 26 20:47:57 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: 9702007 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 91C986032C for ; Wed, 26 Apr 2017 20:48:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8292228404 for ; Wed, 26 Apr 2017 20:48:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7728328619; Wed, 26 Apr 2017 20:48:35 +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 2EABB28616 for ; Wed, 26 Apr 2017 20:48:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967318AbdDZUsd (ORCPT ); Wed, 26 Apr 2017 16:48:33 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:64997 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967278AbdDZUs3 (ORCPT ); Wed, 26 Apr 2017 16:48:29 -0400 X-IronPort-AV: E=Sophos;i="5.37,255,1488816000"; d="scan'208";a="14132349" Received: from mail-bl2nam02lp0083.outbound.protection.outlook.com (HELO NAM02-BL2-obe.outbound.protection.outlook.com) ([207.46.163.83]) by ob1.hgst.iphmx.com with ESMTP; 27 Apr 2017 04:48: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=oI9DgB8DKOoyKlrBxV3Yr3US10BXA93EmG50DRtnDK4=; b=gTkvbfzVh0i+ZqKk2UhAogVSsdsDR74OVJ7dCSxoYbN9tV5ecUX/TscH72QyiGw88/Qu/MAzL5XO3EFWqh3O/TOgfPYeSC3xGexoDyAH57dggCBm1d80FOjEkgcYMMXka9MANuXYaFdBnF7Ag8m7TnlLnTQclZhNDk8ddcOgW0U= Received: from CY1PR04CA0023.namprd04.prod.outlook.com (10.166.187.33) by DM2PR04MB893.namprd04.prod.outlook.com (10.141.157.156) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13; Wed, 26 Apr 2017 20:48:09 +0000 Received: from SN1NAM04FT016.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4c::206) by CY1PR04CA0023.outlook.office365.com (2a01:111:e400:c5a5::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1047.13 via Frontend Transport; Wed, 26 Apr 2017 20:48:08 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; oracle.com; dkim=none (message not signed) header.d=none;oracle.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 SN1NAM04FT016.mail.protection.outlook.com (10.152.88.151) 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; Wed, 26 Apr 2017 20:48:07 +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 2B.F0.19026.68701095; Wed, 26 Apr 2017 13:48:06 -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; Wed, 26 Apr 2017 13:48:01 -0700 X-AuditID: 0ac94371-41ba798000004a52-bc-59010786d29d Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id B6.F9.11415.18701095; Wed, 26 Apr 2017 13:48:01 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Bart Van Assche , "Martin K . Petersen" , James Bottomley , Hannes Reinecke , Subject: [PATCH v6 10/10] scsi: Implement blk_mq_ops.show_rq() Date: Wed, 26 Apr 2017 13:47:57 -0700 Message-ID: <20170426204757.18910-11-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170426204757.18910-1-bart.vanassche@sandisk.com> References: <20170426204757.18910-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRmVeSWpSXmKPExsXCddJ5kW4bO2OkwZQ/Mhar7/azWSx4s5fN YmM/h8XeW9oW3dd3sFksP/6PyYHNY9qkU2wel8+Wenx8eovFY/2WqywenzfJBbBGcdmkpOZk lqUW6dslcGW8PPeXpeCieEXjna9sDYwLRboYOTkkBEwkdk2azNLFyMUhJLCUSWLN/BPsIAkh gW2MElc3R8AU/Xm6ihGiaCOjxO9N+8CK2ASMJL69n8kCYosIKEj0/F7JBlLELNDMJLF6/VdG kISwgJ3E6TMP2EBsFgFViUdL94I18Ao4SKyccJERYoO8xNktO5lBbE6g+OW9j4FsDqBt9hJX T0iDzJQQmMYq8fnmKjaIXkGJkzOfgM1hFpCQOPjiBTPE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forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39400400002)(39410400002)(39850400002)(39860400002)(39450400003)(39840400002)(2980300002)(438002)(199003)(189002)(9170700003)(305945005)(77096006)(2906002)(2950100002)(189998001)(356003)(81166006)(54906002)(8936002)(50986999)(76176999)(5660300001)(106466001)(47776003)(33646002)(4326008)(53936002)(50226002)(50466002)(1076002)(5003940100001)(6666003)(36756003)(86362001)(6916009)(38730400002)(110136004); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR04MB893; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; SN1NAM04FT016; 1:gpVFvqDWKFfgbEXc72IAtV8xFfPM9o1k3cFTzaTf9EJn2wioiOz4Gn2K6iyv4WI20PqqoUfbZ9Q3MQpaD9wGclPQItPoqZ527JfkPFEXaT4aHKT4UBq/PRQsSz4gWg0eGroaHpWaGOZ2YvK/+T+2AR4w8qCHl2R1kNV8DN1eSsBfL1+XgcJ2OtTHEwTugox8IzLG00zIMM9gKE6/EjUuELvKtgVuIPOlCdUax8M6R1hgSJo6r+7a8KEzZ3W7d3uK4nqb+0sN5xcMdM7EM644ff7AOmNO6FiposAsrP6cx5hdAGpLWBXPPZdVgJV841MSKRfokSblWw6mM1M1IL8eG1TI9vDCEYV4H6mpIpbTvNfkt3G1y4RtqgxvELI/ocZQq/cNJpm8kLRWnDHWRu2w+vj935P3vptM+nuFKm2YA+ylZF8O/MVM9sjKQj93saZrw8oW4WEuwhkX6vSU+WfMp7f0TbLpbBTnNiTb3xTWAxUjZm3MAgU4wZKc9om4GAnFj329nE5fNQoKP9WygSkRlYQ14zgtHwW1sLA2z7vXGf8= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9920b87f-eabe-4f5c-e450-08d48ce58ba3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:DM2PR04MB893; X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB893; 3:v0TKL4Hsol+h7Btv6wL/oFf/vEyKasmTGPPUlK4ez+vZYoCUNruWfv2q5Fc64rKwgLt+Vc8LRMwAMX/aA8OtPPY+C61PFyIYcxHfj37hzafW7pwM9frXLfGEQ4XZ7ccy0NXsv8uowAtn8BWmTVEeAw8psRA768IrvmwDZlbHt1QCrgmXFuuv691f5DfYEIW0B9Fu62sK6kJ1HfxPmDLFAuUlsVhzdvelF1mOqXTPa1sfd+E399XJQc9IUEOG0B73FS7YAHU9WUxaBCTXFijQXzVMKhDphjYyWsc/te5FdwDcUw/uceivOwA1htQ55oggjJd32uHpdipcm6X0VorOO9di3PHDKBIeL3edi2pLHeYptwcgTnomdpWuUu0tkVTZ6YkRHCCKI5d01SrTUTKOl3TDqU02wRb0bwntgzVOsq1ttWrmnxnVcl9z74xES4RhH0zqZ++onM7GB2jIePdRuMAHlUNFGMVJuKNFp33MCO5Hv5w5Iulqi3wQmhmw3Gm5BdcRbnCTRZhNH83ataQbIA== X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB893; 25:uTjP1s/FdY5O1RlXlr0YqhN0ZG7jYrraxoFk9DRntNyokni5Tb4khrbFera3kuLh7SZEb5ET9utRJvpptkrEw7LDd97MYZh+A+GMT2tAwvaUQdaRdzx5wvCUiphz8kh0leDKweyIp7q28o6Nx13xBWdpr0l+qVxdEjVDa6VnGBLUd0gtMK01gqdQngwjbYsNFe0VjjazMEiyjtyoFUt3CSs78klTn0pVXERhBpWs4E9I3l9gjKTQjFrl9wWS2F6uOMVqErBpys6/Xxbj1O+CdaPP4CExJY1s5JQRwd6Jz0p9Y16FgYcDPiEFDz5WKIXd4ekp7+Th1T2Q9q8W1Qk+/h3oZ+KY28qfa1TktCbBm7e7nKapp3oAFcm84XwIavebC4Y7lmDRJ7ACYwIGaXExTTr4LdqCAwweSMox9ub31SAiA86V/Rt5RHGd/NhV9jM5cuyN5mNKqaMhDNoG4GL+uA==; 31:Dlmx0d622Fe8rQG8xtJBjI8GP8k3ph3suUcZRZZoUgxWCecY8JeBE0m60uRx6VwbsvSq3tAJwFz8no02gTRKtx0QDVyqVzekyJkvzXJcy45UVHvZukevmfih897Onj2rzUwKNdHr1IYAlpn6IYED80d2qMLwqyffCfNHXeSFhZ8bTfR5OxD1wsSlcFYIRN/BowrBCca2io8EsWG6s+AR86/hihr2lrwE9Pue3OlbeoV8mI0X5ib6b0zOzNVk+kT80+lLAWXTPexHEDbZthBc2oyp0bORoyk94Z+U8GxvKnA= WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB893; 20:870L4I67gNv0mIv9xj0WPb5wW7UE0UkfdBRxfyTSIj4oLHIqXPWZb8glNQ5tXe9d2+3ycGcNbqSV91cTcUUQt/cBqff8IwbttmCayDB01GSd9TSIfxc4tfbKx7AXkZ8Ungno99FvQ0jdqVMWE5ZO0u4Ze49VZ4zGDORqQS64/nQsuVkFAvHjOXI48KCKiZwQHMrxR4SWLxQ3u0ZQ8kIHTrYRYRaUaCUBG78PFvfvo6tyck690URC/4YLs+1f9fR2DCVzZO2KL/t2b1s4ii3JakXsUzuy6E5HK2jE9zQnLtQkviM5VlNkqx3HxTZqLElSHLr5JwoaizeOHthLuEEabesVGcC3eZelPEP9NwntbYotIM5eP25Ih+HxiLhZBq5kOb6YM6X8ci0V6f4WNsRmdf8RTXpW/RjSWgTg9S/5PfSMLN+RWHrvnN0aK1S7IF2TfNwxNfn6PTwx3/nKmyHCSEqKD4Z9Gonu/I4/frQ6pNA/TUqqHvHbrERe40XmahTH 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)(8121501046)(5005006)(13018025)(13016025)(10201501046)(93006095)(93004095)(3002001)(6055026)(6041248)(20161123562025)(20161123555025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(6072148); SRVR:DM2PR04MB893; BCL:0; PCL:0; RULEID:; SRVR:DM2PR04MB893; X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB893; 4:1M2pMhCst7oGsFHAy1NMdHPnitGUyNH/oDR86GXjMgoWd/3QtfYm5aiWCao+rbB2Aav21zprkLmz4m1GH1lGzD/7LD7FuxSprD4gWrclFVQwKv6OysfNWgYihEvkKCSLrRi1LNxuo03uoJ0ZR7XI7MPrPqtj5N9UowoMwxKlcwJce5dKVtY7HTer9nuqcVVxOl5DiOEkp5jtWt2MVkDkVLRHRjs9yRGTp39tW3UpgP+WarNkVEVsfsjhUOVtkIPkaghB6nJPzXW0URGFBdXJ9/JJdc9nS4tfrGNLRsN4xg/KdRC2PoqmLDb0+xjiQ5XxcvZRVcBl8jbMnXq0DJ36POaYOZm3VTD2/2sXkteKU6rJB6xXFNdtjIy4+AFchzDSQ0a6xmDFVzOshNVVfQGJ8tDS9Mh7Srx3Cmm/FWocD+P1N4WLdJ5IN6bvw7d619fnBw8zlkQ8Yy6/EqVWax6fLyykH5ciu+WzUZC2AZooAlsTUBmHv3rPrr53UV97wVcPzCphfuM59jo6EXG5t3NRVx8fLdmK11R+H8Vy/0KJH/nUH1qotLk2CzTegz6bjF9bd8KCHJbuMazPgNJFAf+k/jpHjrSKl5ozm6Ya53G6X8hYUxXD9Rz0AcIRsN5undOhDMGYC3cYJHi6843GKEtwMl9DFznR+U7DZgpfcpw0SITNbN/n03pmr2ZqZZMDBhUV3gZ3ZfmVr0B63T4JK+xb1uaXMT0/G8RrcVrSmoEn+qajCKJ85RzNDDsAlU32rUHpHKcl4Iv3RgNFOenWuqSBnIF2kCLkmkCzYlQmdGHcBA+KhJgaqF6/OSGarUmurHU/ZOLi1i7cZ6lAgAudcXofMKVxLTh0IGpgCSS7jqL6vP07Zj1c/QWl8k+QBavdTpGXfpZutO+9uBpfrLaNiw5mV4dWQuo4ccA6fmK6/Snooyk = X-Forefront-PRVS: 0289B6431E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR04MB893; 23:jJp5lDAF8fp4fCwnNcuJ5uH+MaEZbO4IZiMcsEhmk3?= =?us-ascii?Q?DLMrFXSDb23Uhbig/Uqhj/Hm6sHM96VLb6S7KwU6gayacQELjomwXG9QHAkY?= =?us-ascii?Q?9dsMmDM6VQqnvP+OPSyuFX2JB5WYSqKUAL4/Di02Q6NOn2TxSM3ThDkL4dEk?= =?us-ascii?Q?CHWSiDiXLymD8c33Pb1dsiCxh95SIUG9B4dek7k4nkZsYdQjiLkMlorxu1BV?= =?us-ascii?Q?gyE8FW8tN+yili8vUA0hAvzj66qL6r7rUPr4dodZ+K1mLCpMZeJ8bHlvayLL?= =?us-ascii?Q?bKzq3PeAYSB/VpjgC28GijN9fjpwjTqzfax7NDRyWDkIigxaVKD0SsmNyvFJ?= =?us-ascii?Q?Fmsn82Ch9DQaolKytNHAT4SSslpVz/FletWr6r7vOdeymacrJaE+rojCMWzh?= =?us-ascii?Q?WNXayKPzzzbvWfLikqrrSVMUFmBjC91yNX8XgbtzSkgX//PybM4Hr2wPoNCZ?= =?us-ascii?Q?TQsUYbl0oYxo33XYbBpBX5vTfUWhxzDlI19xlwg/ccgMz4IIqLikpT2Xu/6v?= =?us-ascii?Q?uSkO/kZLBKbQQpNSyPe/7xa09IuBrKbROUmdIcbWktbFf2JJGm5R78g/N1Pp?= =?us-ascii?Q?nTN9RbCfNVlSfC5rp05Z5cxh/b8XEOdjkenlMojqD0zcrNYaozzpa0GDjzVQ?= =?us-ascii?Q?K0uTiauDYFoEdD3F4pd36PK18xXYqUoQkLr2BfuIzi4J7KhuzEq08uROL6KK?= =?us-ascii?Q?NYwPjQMGmZJs4iB90w+6YWx96szuFTfU01y/XwLR5/KtIXDDGJvP2Pd4WEWV?= =?us-ascii?Q?KX0OvSsae8wtNDQG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TACOLFw7yxErNVo9z2gsPydII9Z2oa3lw+0A3c0bhwp4qsOd9LFauZQkIIMIOMWQk2jfI7t92wC/vkDB8KFPey2R6Roi8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR04MB893; 7:bv3y8I5QKs6ohcrEuscuGovaqi0upZ7cYdT96I+pT1NkOfWDUg9ndVM0MJfdAPJklOq3JPHRLg21NiZgfLpgd0OKw2lRpQMcS0ulwOsXM4Xgd8XmtbHe2VEK50Se9bRfwDmXKJCpk0WHTZbEYNOss4NpiW7aTsrBRXe837oHm952cV74psFq4mXqGIPOSaN+rhXs0Bl6QdP/e2IeOhuCkxR/oAJpgEiz4mUKCNSnma9OGgBCZi7J9+sXALzRHw7l9cKTVEz9SC9ZnvZMBgm05o8FXJQjZdzGaE/Pt/ejYJ9uoRODUl7MlQ+7GBRhT82Sj/eldVLMsjEIpJGuAZ950g==; 20:1oEn2P+BxgGpWs3x9lcHriguhOEgpACpOIx2tY+52aaG/TFo0EcoXi1WKr5vORkf7Cnh80LHJFSm/WJPeh2Wx4Y5wJ8J5bstU/Q+C9IgxgbKuI2WTJiTs+9C3FfjXafBsj16qQxnEyicZaR0DBFCQ/VZmg/ru0moHjZ8hgzviXk= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2017 20:48:07.8943 (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: DM2PR04MB893 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 for pending SCSI commands in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list. An example of how SCSI commands are displayed by this code: ffff8801703245c0 {.op=READ, .cmd_flags=META PRIO, .rq_flags=DONTPREP IO_STAT STATS, .tag=14, .internal_tag=-1, .cmd=Read(10) 28 00 2a 81 1b 30 00 00 08 00} Signed-off-by: Bart Van Assche Reviewed-by: Omar Sandoval Cc: Martin K. Petersen Cc: James Bottomley Cc: Hannes Reinecke Cc: Reviewed-by: Hannes Reinecke --- drivers/scsi/Makefile | 1 + drivers/scsi/scsi_debugfs.c | 13 +++++++++++++ drivers/scsi/scsi_debugfs.h | 4 ++++ drivers/scsi/scsi_lib.c | 4 ++++ 4 files changed, 22 insertions(+) create mode 100644 drivers/scsi/scsi_debugfs.c create mode 100644 drivers/scsi/scsi_debugfs.h diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile index fc2855565a51..93dbe58c47c8 100644 --- a/drivers/scsi/Makefile +++ b/drivers/scsi/Makefile @@ -166,6 +166,7 @@ scsi_mod-y += scsi_scan.o scsi_sysfs.o scsi_devinfo.o scsi_mod-$(CONFIG_SCSI_NETLINK) += scsi_netlink.o scsi_mod-$(CONFIG_SYSCTL) += scsi_sysctl.o scsi_mod-$(CONFIG_SCSI_PROC_FS) += scsi_proc.o +scsi_mod-$(CONFIG_BLK_DEBUG_FS) += scsi_debugfs.o scsi_mod-y += scsi_trace.o scsi_logging.o scsi_mod-$(CONFIG_PM) += scsi_pm.o scsi_mod-$(CONFIG_SCSI_DH) += scsi_dh.o diff --git a/drivers/scsi/scsi_debugfs.c b/drivers/scsi/scsi_debugfs.c new file mode 100644 index 000000000000..a97c9507103d --- /dev/null +++ b/drivers/scsi/scsi_debugfs.c @@ -0,0 +1,13 @@ +#include +#include +#include +#include "scsi_debugfs.h" + +void scsi_show_rq(struct seq_file *m, struct request *rq) +{ + struct scsi_cmnd *cmd = container_of(scsi_req(rq), typeof(*cmd), req); + char buf[80]; + + __scsi_format_command(buf, sizeof(buf), cmd->cmnd, cmd->cmd_len); + seq_printf(m, ", .cmd=%s", buf); +} diff --git a/drivers/scsi/scsi_debugfs.h b/drivers/scsi/scsi_debugfs.h new file mode 100644 index 000000000000..951b043e82d0 --- /dev/null +++ b/drivers/scsi/scsi_debugfs.h @@ -0,0 +1,4 @@ +struct request; +struct seq_file; + +void scsi_show_rq(struct seq_file *m, struct request *rq); diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index abc391e00f7d..1c3e87d6c48f 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -34,6 +34,7 @@ #include +#include "scsi_debugfs.h" #include "scsi_priv.h" #include "scsi_logging.h" @@ -2157,6 +2158,9 @@ static const struct blk_mq_ops scsi_mq_ops = { .queue_rq = scsi_queue_rq, .complete = scsi_softirq_done, .timeout = scsi_timeout, +#ifdef CONFIG_BLK_DEBUG_FS + .show_rq = scsi_show_rq, +#endif .init_request = scsi_init_request, .exit_request = scsi_exit_request, .map_queues = scsi_map_queues,