From patchwork Tue Apr 18 23:29:49 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: 9686667 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 88C12602C9 for ; Tue, 18 Apr 2017 23:30:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AFBE20265 for ; Tue, 18 Apr 2017 23:30:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FC3828236; Tue, 18 Apr 2017 23:30:21 +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 0883820265 for ; Tue, 18 Apr 2017 23:30:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758252AbdDRXaT (ORCPT ); Tue, 18 Apr 2017 19:30:19 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:3701 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932561AbdDRXaL (ORCPT ); Tue, 18 Apr 2017 19:30:11 -0400 X-IronPort-AV: E=Sophos;i="5.37,219,1488816000"; d="scan'208";a="11461397" Received: from mail-dm3nam03lp0019.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) ([207.46.163.19]) by ob1.hgst.iphmx.com with ESMTP; 19 Apr 2017 07:30:01 +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=ZVYpQUYnqyjlR1zpHnPxH340vwyN5CdOCexAG2+0Vj2Gus9dpgccq/jUw5VqQhuPXRz/iRnIZ2SfosCfhUWRvGzkzbWG+v5Yd9ekSma3i2UmeGGWjNQJD9qFVfb+XmDNS6q6xUT6sBcJe/cqnx0n70XjdK/qKz5Ib2FRL9jJedc= Received: from BY2PR04CA049.namprd04.prod.outlook.com (10.141.249.167) by CO1PR04MB266.namprd04.prod.outlook.com (10.141.71.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Tue, 18 Apr 2017 23:29:58 +0000 Received: from BN3NAM04FT004.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4e::200) by BY2PR04CA049.outlook.office365.com (2a01:111:e400:2c5e::39) 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; Tue, 18 Apr 2017 23:29:58 +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 BN3NAM04FT004.mail.protection.outlook.com (10.152.92.98) 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, 18 Apr 2017 23:29:55 +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 A0.8F.19026.071A6F85; Tue, 18 Apr 2017 16:29:53 -0700 (PDT) Received: from milsmgip12.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, 18 Apr 2017 16:29:51 -0700 X-AuditID: 0ac94371-41ba798000004a52-b6-58f6a1707dae Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id EC.84.18148.F61A6F85; Tue, 18 Apr 2017 16:29:51 -0700 (PDT) From: Bart Van Assche To: Jens Axboe CC: , Bart Van Assche , "Martin K . Petersen" , James Bottomley , Omar Sandoval , Hannes Reinecke , Subject: [PATCH v3 8/8] scsi: Implement blk_mq_ops.show_rq() Date: Tue, 18 Apr 2017 16:29:49 -0700 Message-ID: <20170418232949.5228-9-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170418232949.5228-1-bart.vanassche@sandisk.com> References: <20170418232949.5228-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrLLMWRmVeSWpSXmKPExsXCddJ5kW7hwm8RBpcfMVmsvtvPZrHgzV42 i439HBZ7b2lbdF/fwWax/Pg/JovD966yOLB7TGx+x+4xbdIpNo/LZ0s9Pj69xeKxfstVFo/P m+QC2KK4bFJSczLLUov07RK4Mr5sfMFW8Je/4tKqJsYGxk28XYycHBICJhJfuucydzFycQgJ LGWS+PB2LhuEs41R4srxJkaYqttd55kgEhsZJb7sv8sMkmATMJL49n4mC4gtIqAg0fN7JRuI zSywmEni4tMMEFtYwEbi7uTvYPUsAqoSa7qmgNm8AnYS5659YIVYIC9xdstOsDingL3E5utn wRYLAdV0PjnBCLJYQ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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)(39860400002)(39410400002)(39400400002)(39450400003)(2980300002)(438002)(199003)(189002)(9170700003)(33646002)(38730400002)(110136004)(86362001)(5660300001)(305945005)(50466002)(2906002)(81166006)(36756003)(356003)(8936002)(8676002)(50226002)(106466001)(1076002)(5003940100001)(6916009)(77096006)(76176999)(2950100002)(4326008)(53936002)(48376002)(47776003)(54906002)(189998001)(50986999); DIR:OUT; SFP:1102; SCL:1; SRVR:CO1PR04MB266; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN3NAM04FT004; 1:An1wycj5mKXOO5sBMpmlcdyquDUE6ZAA7tf8Gv+QAYrWLGIi//WjyjYqKYUEInDtOGT7YCWaJbZV9Z65TWCsPWUNi9dGZ0MA1HyBmh5PeVwdcgsAn1W5/MJG4bimP49ilm48hCo4m/yf7mpLFWAO//QRLsZJTQ6aGnXCuWk/bEHgeB62nbpjkDQKOsKcVKafPZ8ySqyslX7GOgMZIbSFcDd149+l05YCJ/qU+xNaDyNOatG8fes4tD4XXD5KlQB2KUbErBjgd5DaFgaWP0NclWcsbTnoXX07ExzKGwuMvkEFcp/cprQ5U61QzITjDNFavGX/o2zmhGM93/eaDWAqfzhBz3fEiz+7z4a4Dft9nhp2y9pyW3FCHkgP7WNjetUbbGqK4blSH7bEEIO5Isfby7Eqd2tjdYDyZJLG0wkIgAyOA92tFZG7O5MQKDCRfYaZD+LFL54hgYTzkElNQKXEqd7jjO8SsOR91Tm/my9HZe7z/Wb5nqg1EFSH2JWr3ICy0tzFb6uPri51Gdr77oc+DqyLEtNy26Z1mNbuO10CXfM= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ae19e2e-8087-4640-5017-08d486b2d321 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081); SRVR:CO1PR04MB266; X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB266; 3:gu0sEEtk4dUXZwRWBoU1gsqXjNKAV3/nXjAAj7jXCex0Y4a6+AQWquMO6LN0wqwrHeIEMjKjvjI5rKcsK1VorT89LLo8TyLkkgZ+hWJjrzWXvbgwy9H0vHAed8xaxDTq5DQldKXlUb7mVlWLKZfXbA+cG8lkoMsd5cMTR3a/ASd3bHZGo4evN6UjqDNuvLVICM7DWN+mfoJCY4vmEgzhSnma5P5K5wMsyWP8dHGSCom8MBH5iT2jtj2MV14CAmwE18ba5sRWFA2b4o/afK4JxMdGbOo1hwm/4CPJQEQBKPVieSBnmU0vWXEHifWTmEv7LMh95j0KUE6lilh++ZUg8ZNZbdueTuRVFBCfnBNYZiR2lVGv/rAY3H1QJTPkfO0oZoLfW0O4Sqq6Sh8vY49Knm9yzEvO8aY4iJeWLvvhCklzJt/EPaFmhX9GnZGN4tY1QosqM8U9sQUWcZ7F+A71T3qGJxhEtoObtSdq9isr3xtA0/OkWpveuX6gFER8A8r3 X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB266; 25:EzI/93TjaXBkK2STXt19dS52oJARqetlwihCyIlyHNgu+1d6P0QY0cheuVeql7B1/Gs4gz7pSwQM9o8lh1DzfTAVJFeynI5KsExvRMgecYkQlm84uWQ6oMe9gzsGyBGD5NXeKPyKiOkTZPv/6+uyUYKjhU8rG9HNDuOXSiLnfkQLdKHTpwuqTh2P1A7wypQLJZ0u77Mea4pQWT9a4oqtU1QnJ9fnMqx4AGieGBhv9tPylnK2OrPVTNBy1oNf/0XAba4c3pdyC6UPoT2H60orNYf58z1OcZccAxSFNVpULeu0GavjX6EFKit1LqioacAj4jWEwKlGd5ETdMgz85SUC9/ZJSPwwYa+VgW9Mq3DwfFvLp2Nx2Pi1LA/Wwt0AJpSzwAyHdqzff7uyi9D4NirCtqJUGj8PTKGpdqB/vfB56JvBopWnwTADxRX/fnC67WqGGcQ2AkK1b1WRthIHdzzBA==; 31:13SuUBmndixlaILfvmHncfuIqPrpUveZbR3NVGdMRgPXdVqZIHUT9W9FTUm1ZTw7Ms/dhkx2H+G4Wto3DwaaWbdhTJ6wvgaBK56t/maQ+CMMO1lIfyDGtPtzYCEt0twtoUzRJehfmKHprmYJHinHK447EM8+kXuHwieAA3amOQtLSaNK0rs+FWjfMg2vZMk5DzH/AA8hugQMEivfyHrndZFZh081q8HzLUNXp13ScXuTalOILfVRZlFjdetl9cMMCgZWJDvevHaO2S1A7X+DJg== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB266; 20:UOfqHdM/sStD4ceHSgLOXIIK8SMe4Lycr1L7nwjeH6RrBa6XcGvUq2qqK1pIDJtx7+mZ1wDNwF8PMYfnkNVUf5bX+U7CGYLazeLy6FOqk2YtL9Q776hplWvmvRDPndmEqwK+V+m4f/UFrfSLlakxF6oPMZvrHk367yW8TdNVh8fiyVGUT543Wpi5xlDRu4JdHS1enleijU8tJpNor6N6hm0UxhlAnUgTbS8638GWoyldECplSEJ85o5DO4tkoguuM2vW/jXCFvHJV6ywW+nUA6PpdYz+9TUVlM5xX7eFo0wJU8eqPKZl5Emjk6tBWXh3NUVmGF0SkryfYUeHb2PRCFTFGh4GAKJyiWC2V0y1NQLmMCpmxS6hVq8RBkzEfSN6aNzMhoR8Rl0rxTO+reNG0Y1Ah4GM3Ts5cu0mHWJKDi8gaBasia6/jgRVLUnKproRaEVd8JvNmLZ1w1CnC8XADWjagBKln04HWU4oiDUWI8cYDFPnlOx5pjeWbyTl3+L4 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)(13016025)(13018025)(93006095)(93004095)(10201501046)(3002001)(6055026)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(6072148); SRVR:CO1PR04MB266; BCL:0; PCL:0; RULEID:; SRVR:CO1PR04MB266; X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB266; 4:x7CXexGMdDtfngULz3qNwosSAICFBRwAo6L7V0SAQvM0foWVpGpJ/hxRJAtqwrlAjbOApjvhKk0jcGxtVrZoArYh09HHZU8spz+LEsy0fmql/JV1J6eDDWfppnkqDaRxXCweFdxvBr56YiqgN208bdROEzju8KaKr85XMbxoFX8cbo7XLYJ8olH9oZw9nMg23QGCE3zeOZK4HnEZeImQXAKSUMSJYgIcHEaGyJjVaIbdvutw7isucLG+x0t65ZsB2uODOfZO7GH+Z6xRboGb8OUdCm8Cg/oKgMXGGUx2aQC6zMOx82Cf9VQbcTgZA38dodR4dBE4RK/3nOI6KTmTmXCDW3rYdVqhx6YlLsDsyH6Sy2VHzWBPVCj68fKWqEfS+ubH6e+57MMUy/EExbo/g7QR9h0cl9MMsATbQLfHqNE7TulV3TRku2drA+C+nne0/hoaYW7IaVEm+HAt1gu4Hpe6XSwuN5tTWibu57up7E2Tjo9ZLwSjgm8JB0oUGQkk3+HCkCh3Bz1qFKq5XnbJcTwrGDeDpoLiihwbSw2FvzuHIfURlEmYhgixZ0xXx88jIVy3cTbLaa34zvHjzed4m5l51TtHpd0o+Q+db/s+9CWxnk6j7Z2LNa2IJSjtn/K04HYsBTC2iEatByZvw/wvYlsDiHiJdWIm74YyHCGFegpdTMxD7O3z3IW51+ARzU4xzd+AEjM1v+OtQxlxkH+e5nXif4ws1d+hLrq9PjNSNAxHcj6RqPqVo+nQX6/IOnahMm5/CqH8o4NbLdXzmKHwMnfosnYBtbtDAaeKkq1mLRbVmyx+QUUIW8whVj3CbuV2eeGYuarW5xXx62B81lj62gA56JMwMJAEQcFa3hcYWIF6EE0qMDneDpDCaS4YRqcC244OoQodew/vbZa751C/cRogSuepThjsLvGyMitm8oY = X-Forefront-PRVS: 028166BF91 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO1PR04MB266; 23:IqXhx1c+F0nXhnAvxqEtkmmVJZhTQzWwPKDYUaMMwg?= =?us-ascii?Q?LDgcDXUY+qR3SD7xSXGUFjAwGZP4d39HVUM1uU+kjTydBtQDvs+5KMGIAjIu?= =?us-ascii?Q?rxq9nHrHPCFhprtwdAI1JTMyfv7UjBpDDEu1Nqhj1nncZsYvvdI0+9ZJYXRD?= =?us-ascii?Q?pL5mn84n94tCsQzjZp4wUv/F7SBtjN/nILKmwPWTwqwQEJ80Phos86WhN9cm?= =?us-ascii?Q?9GdCchLtmDEPunmBFp7bDDt+nPpbenEa6+tlxbxqC57b6Up3ZuC2KJBQBqMf?= =?us-ascii?Q?GB5nQwoSHFyfEM9T7/+Tb/7kL8JcVFKtR227HpDJaPyYoDX31N7BbE8iZff3?= =?us-ascii?Q?q0gGCJ48auWsjRwOMsy2K6EAEM0K/tJA38FbFWoRWUo3dtFn2cyTvE/0FokG?= =?us-ascii?Q?1poeOBzFnit3OivcvGd5p/F5jDFR2QFze5Umvlpn6l+YgBzuYZBGGmOFOxbA?= =?us-ascii?Q?/w12IgtaSvWZZFe9WVPCMITim+k9OG84eqDrs88x8TOEz4uHlfNVypCV31j4?= =?us-ascii?Q?Cv8bVpM8k7so/4P640pNBU3Mg0tHVZ81zANuno01Hqi2uuAbgWlI8hnsR6bl?= =?us-ascii?Q?e2CBL+ER40/xbwj6GW6mB3C9hdLs+dvU+wuvZ5pxEWva36FvByScbjRN7SXs?= =?us-ascii?Q?UyAzHa/Z9VUIz2A4MGA4Jcdgd++MGVk7ouhidvLnP60LT7+8SGrZqUVXWOAZ?= =?us-ascii?Q?m1sowWeFiD4KPW84mX/ZspKacN6ejVOaZWG1rqrEtZydyXgo1nliuyGpOPtn?= =?us-ascii?Q?wG0Y38wllxgB+1RN9ekTw4NXJnXzTeGkK8GB0dMjkITwivj56a9fKmBq3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Output: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO1PR04MB266; 7:V6wtxM6QID15wI+ZmhhrYNamlteb1wi7CVdmt8kpw/n8ptQe90bbu2Bnt0qIoGagXMKX7U5X02LVvgfkqsJKgqYQIxJ4ak+VRgGjJmxEAgLuwoHhufXfOyG76Ko4//XB53BZZwecjuBFM4lWyoyVIUvmwRIzfY8ssx7E3rY2ruQQmBei4GPQTQrWMp3CW43qepAZCKLPflo+S/LG7z8AxM0Vekl/4BxxToFsyxMIAjToN2HSlqOEFEY9oPkj7+tVQWnOLD0f/7VNjupjK4I6EQyrgWHW5DazRx2G0MUdxESBEPNougGd7D1jkqkOQ0BYfc0cWj/9aa3HZnhOVdc//A==; 20:DDjC3RVB8hU5m5Ov2EQIdNcbUdSHHvRgkny3zGXYto0cBOMNyd3Ypr08RMtwWqtiB/zrw85GErxkuA6eYNX9fe4pd0vhYfA4tlKKCeP46VNFzGNxoKPxNmem2y8jbknG1IGCr5WEA96di9Xq2hjzQ/U3qo8SNmazznifOX2k1y0= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2017 23:29:55.4414 (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: CO1PR04MB266 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,