From patchwork Tue Apr 25 20:37:45 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: 9699725 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 EE700603F4 for ; Tue, 25 Apr 2017 20:41:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D89782846B for ; Tue, 25 Apr 2017 20:41:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD40C28485; Tue, 25 Apr 2017 20:41:26 +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 45B412846B for ; Tue, 25 Apr 2017 20:41:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1950541AbdDYUlK (ORCPT ); Tue, 25 Apr 2017 16:41:10 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:51259 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1950457AbdDYUlI (ORCPT ); Tue, 25 Apr 2017 16:41:08 -0400 X-IronPort-AV: E=Sophos;i="5.37,251,1488816000"; d="scan'208";a="13099764" Received: from mail-sn1nam02lp0019.outbound.protection.outlook.com (HELO NAM02-SN1-obe.outbound.protection.outlook.com) ([216.32.180.19]) by ob1.hgst.iphmx.com with ESMTP; 26 Apr 2017 04:41:07 +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=xPpbyccpWQ//G6yX/Kp1beXAu3HWoA9Cmv/1IzC/sRo=; b=RMFMcr9CD+mA7H2g1aU5j6+ECGvrRIsQYI/rOxyc3qAyR80jyr4DkswLF3iZUhgYLKHETdBhS6QPyiYt/+93wOf6djtxCIpRaAzBOW4DqhDr9314/d//SfrMQ3Bq5NFws/abeZrnN5yilDv0+YNKf3se7vdNfsnsKMbZijT/cn8= Received: from CO2PR04CA028.namprd04.prod.outlook.com (10.141.240.156) by BLUPR04MB401.namprd04.prod.outlook.com (10.141.26.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Tue, 25 Apr 2017 20:37:54 +0000 Received: from BN3NAM04FT012.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::209) by CO2PR04CA028.outlook.office365.com (2a01:111:e400:1428::28) 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; Tue, 25 Apr 2017 20:37:54 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.21) smtp.mailfrom=sandisk.com; fb.com; dkim=none (message not signed) header.d=none;fb.com; 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 BN3NAM04FT012.mail.protection.outlook.com (10.152.92.169) 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; Tue, 25 Apr 2017 20:37:53 +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 F4.1F.29323.F93BFF85; Tue, 25 Apr 2017 13:37:51 -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, 25 Apr 2017 13:37:49 -0700 X-AuditID: 0ac94369-548749800000728b-e1-58ffb39f3bd5 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 2B.2A.18148.C93BFF85; Tue, 25 Apr 2017 13:37:48 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Bart Van Assche , "Martin K . Petersen" , James Bottomley , Omar Sandoval , Hannes Reinecke , Subject: [PATCH v5 10/10] scsi: Implement blk_mq_ops.show_rq() Date: Tue, 25 Apr 2017 13:37:45 -0700 Message-ID: <20170425203745.19946-11-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170425203745.19946-1-bart.vanassche@sandisk.com> References: <20170425203745.19946-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLLMWRmVeSWpSXmKPExsXCddJ5ke78zf8jDHZtkLBYfbefzWLBm71s Fhv7OSz23tK26L6+g81i+fF/TBaH711lcWD3mNj8jt1j2qRTbB6Xz5Z6fHx6i8Vj/ZarLB6f N8kFsEVx2aSk5mSWpRbp2yVwZSy/N5G5oEWsomf3BbYGxi9CXYycHBICJhIHbh1l7WLk4hAS WMokcbV3LguEs41R4sbCvYwwVdP6LkMlNjNKvLlwhhUkwSZgJPHt/UwWEFtEQEGi5/dKNhCb WWAxk8TFpxkgtrCAncSlRevZQWwWAVWJ33f3MIHYvAIOEs9unmSCWCAvcXbLTmYQmxMovuJK N1hcSMBeomvnLrDzJASWsUo8ON/KCtE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AttributedMessage: 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)(39400400002)(39850400002)(39860400002)(39840400002)(39450400003)(39410400002)(2980300002)(438002)(199003)(189002)(9170700003)(305945005)(1076002)(4326008)(8936002)(86362001)(76176999)(50986999)(106466001)(77096006)(54906002)(36756003)(50226002)(50466002)(5003940100001)(2906002)(47776003)(48376002)(356003)(189998001)(33646002)(81166006)(8676002)(6916009)(2950100002)(6666003)(38730400002)(110136004)(5660300001)(53936002); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR04MB401; H:milsmgep15.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT012; 1:zuls3rWooz2PBpkp4ubtJ2o83qwLV6+qWKxURqYX3HTk1chrhXs/3fc0EaAcKHnUAMWnGNilj7y//0nsC/dwTX3CGYqmy9OJDuF/A3NIfH2PA9YPCFAEc+WOiD0sP6HXRfbFZOQtdnT7+NdZ5CyEoPRSUhdjbwcaFPl+sGrQhSV4wfLPv7CxR6p4b2C6pT/aksB3uELHbCtL9RMuKR5qTa2JbOUkhComrk3lY8WI+VUt9zaJq8EBiIrhYExPz0ZLihuqr9lf/7+BNpeZILK3H2ckmrMKkM+bkP9JJAxhtJZAOIfyN6SSgGOi8XS7jTRCpTlnMH4Dk9ydRQRHwq4wFRsOh7gVMWXVf6GqdGEmnP/E2SvH2WcghHW/0r/1H1dNIYJlSaFPXp5Wkgmt88p/n7UHRdn/65EGX/FYOikUqEguwubkXFq4uVXd9Cz3rdX6WKOABI4Zrdm1Jsfe+CUz5CYKEBc0ZY2tmZ/XNQTM52zhiuIMMcmr/FCaEs4ikSUZnkUlILTC7cTbuoFOMVH1189PD3Rw0wBrPhZj3EY9H7A= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 81d5fe8e-cb06-48ce-594e-08d48c1af2fc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:BLUPR04MB401; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB401; 3:XGyUKDKpSTZGc1qzJGDSmD5Im8NfCB2lzZeUi1xP6EnUH70xanWK30xNjUQOYxqWFHWvGIIKBIZ9a0B9BRHG2PZSbYdgBudfbhTRKtK+qKQzQECLgAyKSDcVAB3vF6Eo97eB7KcJDYt90Rq4qW9npSx3kamoSjNDTSxAvIpS6zpTdAWEZ6FzAJnmEKIX1YgqY4Yr6adL4S9bM680pSBqyiDC+ltcicX7W+krR2W8xoxWy3hJASeFKA2HRdNfiMauRyywqjWWd/uMgVL3bs9g+IxFGg0OUSJroT9Ww8mvVgOShvRScsS77QitE1crGTEopjMvqWNTVEkZvup8zRwomOXW67azQzlfhKyXSQ//RtmraRDViNNysTk8giWUG9KckgU07cDbmtkhVd5vt6SvPjqyJHYEFWucAtLqyQtcX6ds8ccUJbqy4Gpd1T7Olk1jGduZaHc1CwslJTbQoXK14cKtoF2lDEV/0L0lo+XozfkaBwbtjxX05NEP0KDDyAs/ X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB401; 25:eX8Z3eFBpkkyX/5WK0qcmlGS4jOym/27mHl4yqWFEbrRkKztlNYX8efGzIQMoqRo8XezGPU/mWdLXSJ0dW+JDDuEhAVf8QRiQsZOTIf22e4qUTe93q7qGz003zWG0suEza53/7wJVC/jCvwqxLH06HOLf1GwUbWwg5QexjTKzVBFd1fZYR60VAOwLqTSFThBGg2WZB1xTQmKzPUMIVz6JAJ8GJdE0wweMga8LEnEL64V1YLC2m8tAKw9GgXw5tL0CXPRkEm+Sn1EbAg1UU7c8URAh2UXTytSNq/SO/svi3hXTi47iRL/jr27v3EArGQxXvnRjyOVbzJ7HfjPZ5t15Miqcvf6rMgZRbBF0Z59joq7diBoR+O5Mh/EKGotVb5Kxg5yFNJy+ot/3qJECUiqc3TnZGpNvrKHHewgB+2fc8F2yVYVuYgdRrofsNtkao6eRqYDwR2a2VaWSSebS31WVg==; 31:bmesjG9zjZif17+WUgB1HtvhObY12rzsdpm3OqWx7Y0AVphfmB0QhNtszX/Fg/3lDPtJX4McxGh52qqd7MOmDCYRYsut5WSvvRQpCNjbDMOlmLvo8IUswb+zfEWr2c+XVJhA02S1qlZ5wdybzB7xqzcSM/leNSi6Zwd8618j+bHIpHQkDaWFc+Q85nR6M9cq/75t5sglMk2/TPoMElLCm36TOUg6LtwboTcnwT0oL2u2RVnpf7sN29bRGcOc47mw0v0m4weWUv4pta5m2TscOg== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB401; 20:UFTVDegjtuNayfuYlhSkFb3c3YcGDCAuAPMESEvpFPEiKIXCw4dXbxBwMZBPqiiczyTVd2/qv8J3rCBN2fT1tuCXA5gwqx55QnoSOUgOI4HIbBOrKdsj1yzJGUK5R91wPO+kObLgsrYDZrrBEX55fJAEUPYIIOqMsL+RU+2sHzhmFbAjD+TpB3raXLTtnMhOGdFOxRFC2nRiB4zM40Y5QfKUlSlDOq++ZeVONet9noizOcmipAW/pdSqDDpyOrHE/MwThf9b+xkhOTV6JXO7ykeTVkOXa0mYXZp/lsTsOwMVZ4CZH4wLf8D5HcsGc9ljCYsBjo1x/kw8TFqoXE0e8F0Kr6G120sXyN/22NmeN6cn2tLdkhca/oO69oap5PepO2kWXDCNDbs5GcwMgtsYcd1uDqaZV5WU48C8o3xSVYZk7Vtd8bxf9QTaPGNw8AJlhZLavBzc8l59xOGUsb91Zn+WkZbL7ZJzFO7iDUisYFmTWrpe0wDVCpolqNMpEFNU 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)(5005006)(8121501046)(13016025)(13018025)(93006095)(93004095)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:BLUPR04MB401; BCL:0; PCL:0; RULEID:; SRVR:BLUPR04MB401; X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB401; 4:V0VyPcklA58ktUtRp26EDJXpM5579A/Wui1LHXqKPAf5UWOXQRz8KuclfesZirP5Wm2b3AH4yEjFRKSX6YT5+GN+R9dFJQHcHzCk044AWvF9nf5QusEtwfOIABTC6o5CQcf+F9oCqN4j/vdWO4ugQTxAk10GOjj0sp3AHy1l0LWLbkmJM7t1xxfZIIaekElnoaeN98Xrl3JwQQ3PHWbs+6xiWJpVfgYk6hiICl/RjR/dzDtpbbN98eCND5QOW5QWgT/w2IwDZFJRknKy02r1QwWLUkN4khXkRkoFK7a1DjtjG00ErIS39gg/niqCiEgsOMlp+ROloXpiuxo6Kj+WAyo0gQrZQsXWlMLJOe5TvSUMdvTKKSn6SydsdzdBEMuxNdCXYCIXRyKTcZAVYOyLK96PrCFlJMF82eV2r/opxj39/RE0bZUNuz1Msdu/y7zKHqpnCHVxm2GkraQdG+arwJOiv3HtgRrGdyCCB+n5y+WY+IWHM89QvIr/AXIMZVpskb9Oj4gqJMv/pbgCzYPb1GIrjZKflxZyU3zCVlVTq7dHoXC+xjrbYDnYGm96PQZc6dw4yganhm0jcebvBbKTJglVquBhliMBLFgguFcHbMdXQyl5FHuD2dNUOgzKB+N/lP/zB8r0T0INnGUJYgplMZRj9eun+mQawaTRtBgywe1qWAygNfDq/hzo8KbZF9OmkXrW+9+/UzyEj/4CBosxgctDcWPoDwcSHQh2bgLFzzgtUD40qC/Kfzf6QSu1YExqO2Kubp0mNvOgmrcXLB6DYc1NKnqUSjsFZPl6MQjgVhbZBJH30lCvCxApGji7HOelsmtRbgMq1Ao0hUnv3l2SjZZedRzHyU9CfiaW6pcgzNj1Dc1aZCqQxn6kJG2ibChgpfpAJjJVoYbPjG7qoQAHLF7l2TmB2MQqRaFNsmysngw = X-Forefront-PRVS: 0288CD37D9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR04MB401; 23:D2udP0DsEi/J2N9Q7//7wRdwukDzg3RmPUBEtG0qNC?= =?us-ascii?Q?sMOMBuVVGG1/y5AiyNvD6Ncxeas51Qw+XM9w3mHCehmFlGeM3razWxIl5e/l?= =?us-ascii?Q?iWNhSplEmatdBSNtLunYlo+9VLFpxbl3QIoMv+Rit62Vhp08OqkKagm/3Jlr?= =?us-ascii?Q?kVBIa/tzhHikqjKixeL/391X8Q2nv+9vcrqegwBe8gg/JyYZy95x3xLhadhn?= =?us-ascii?Q?c2HRfgs7K45Mzr4ebixPesHgpZDiItkRW60G2XzPbY6ARRggbeEoey7uEPrJ?= =?us-ascii?Q?C49O9GyrUKx8lcKlykYl5joUd0kiJ8RTZs8L1MUzRotj0B143Rofn6TB2Fxy?= =?us-ascii?Q?CwAOVpTDYrGnu6ZyQLuyn+kvGi11xRj3oOjil8FNjO0T0VajcYATvbIrXAuQ?= =?us-ascii?Q?4q6RR8s4IMVLaAu9pfWnU1t3XVZsvYPjJYXzO53zl3SkAHk0LSBreDdWSQuv?= =?us-ascii?Q?6XzQIpPHG+DcdCbfcdgvg9IRJAyZTtLwtiLuVMHH/Bsr4awHdx6BKOv3y5XO?= =?us-ascii?Q?KndtibjiBMwAJlyoPRQ2LjwgBjTGsgE/mryZxoTrjRxOUXRmLt+QlVZaKMUQ?= =?us-ascii?Q?rv6jP7IM4yvifW81kLsPYZVoJuSitmC+r5HaZ6YneKxZNyU+wlgDTjDFgNe5?= =?us-ascii?Q?6Clar8b0WAGwhMo4YmSbkwK19jfRbiVSsZMuo1SPWcPgGN3MUw97YTt4jxNZ?= =?us-ascii?Q?PFlu+e1YEJkLIdydNLSlmihuK1cgDVj+IthvypnDQATYCFHyARNy5TNuueWN?= =?us-ascii?Q?R5wyIU6HkVXPac34LBbyXHj9h7clQp8RWz7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wZ1PfsL/93Iwr9zWvDsokU5W2hR+ZVQtbUUQDhkyqotjUhXwQCbMI1dAPk3XWlwIzoo3Z/3cGw+E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR04MB401; 7:+8RQM90JwOUh7Vl38jBhXw5McVAf1UnO6PMoDj/j7yA0X58NCn7o326TDJ9QScFEHj4i8PqARkV4tiHT6pqXIqBBlL4UrZdFgYm5iwLH1vFSAGWp+Ic5Ejc667OyllViZvcDfBCA/ctDyh1KaemtY12T6c+knf+zS2L9FFSyngon03kpkhd3OqImMpEJQ1grSkuPNnlE57dS3wlS+j95ow8QdpDqdpsyxpeulyXiGP3XShlabJEkTPqHUkGao0LD+2cQxWqhSXeJjdARcP20t604NW7iidygVF+odu6+lrfByw70s9DvJFHpuBIv2uKL1E72R2QZOAvPxLybkVYplw==; 20:P/VIVPjsxnqZhoXK+StdciBHxf6Dw//hCW3BV5HHwft9P3lJ+olvJBgl0leTKL/UShoo5Od7dWJaZpqSETbGN652AQhkjJAW6X1LUhUsgbNACepniNj6MVMRsDx8ae+aPjAlKLY6iSbnBSm9U5Ar6+GqkevrPsbYqMvgTrb4X40= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Apr 2017 20:37:53.3182 (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: BLUPR04MB401 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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: Reviewed-by: Omar Sandoval --- 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..f831c23fdee3 --- /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[64]; + + __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,