From patchwork Wed Aug 30 00:07: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: 9928581 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 EC786603B4 for ; Wed, 30 Aug 2017 00:09:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD0EC28A76 for ; Wed, 30 Aug 2017 00:09:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D201928A98; Wed, 30 Aug 2017 00:09:31 +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,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 4DC1928A76 for ; Wed, 30 Aug 2017 00:09:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751757AbdH3AJa (ORCPT ); Tue, 29 Aug 2017 20:09:30 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:37711 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751744AbdH3AJa (ORCPT ); Tue, 29 Aug 2017 20:09:30 -0400 X-IronPort-AV: E=Sophos;i="5.41,446,1498492800"; d="scan'208";a="46351062" Received: from sjappemgw12.hgst.com (HELO sjappemgw11.hgst.com) ([199.255.44.66]) by ob1.hgst.iphmx.com with ESMTP; 30 Aug 2017 08:08:01 +0800 Received: from thinkpad-bart.sdcorp.global.sandisk.com (HELO thinkpad-bart.int.fusionio.com) ([10.11.172.152]) by sjappemgw11.hgst.com with ESMTP; 29 Aug 2017 17:07:43 -0700 From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Bart Van Assche , Hannes Reinecke , Christoph Hellwig , Johannes Thumshirn Subject: [PATCH v2 3/3] Show .retries and .jiffies_at_alloc in debugfs Date: Tue, 29 Aug 2017 17:07:42 -0700 Message-Id: <20170830000742.29653-4-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170830000742.29653-1-bart.vanassche@wdc.com> References: <20170830000742.29653-1-bart.vanassche@wdc.com> 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 Make these two member variables available in debugfs such that their value can be verified by kernel developers. An example of the new output from a system with CONFIG_HZ=100: ffff8804a41ed480 {.op=READ, .cmd_flags=META|PRIO, .rq_flags=MQ_INFLIGHT|IO_STAT, .atomic_flags=COMPLETE, .tag=17, .internal_tag=-1, .cmd=Read(10) 28 00 09 01 1f a0 00 00 08 00, .retries=0, .jiffies_at_alloc=-25647} Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Johannes Thumshirn Reviewed-by: Christoph Hellwig --- drivers/scsi/scsi_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_debugfs.c b/drivers/scsi/scsi_debugfs.c index a97c9507103d..282834935e07 100644 --- a/drivers/scsi/scsi_debugfs.c +++ b/drivers/scsi/scsi_debugfs.c @@ -9,5 +9,6 @@ void scsi_show_rq(struct seq_file *m, struct request *rq) char buf[80]; __scsi_format_command(buf, sizeof(buf), cmd->cmnd, cmd->cmd_len); - seq_printf(m, ", .cmd=%s", buf); + seq_printf(m, ", .cmd=%s, .retries=%d, .jiffies_at_alloc=%ld", buf, + cmd->retries, cmd->jiffies_at_alloc - jiffies); }