From patchwork Wed Dec 6 00:57:52 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: 10094549 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 6D76460329 for ; Wed, 6 Dec 2017 00:58:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59C5429151 for ; Wed, 6 Dec 2017 00:58:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1983A29267; Wed, 6 Dec 2017 00:58: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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 EB4AD28F20 for ; Wed, 6 Dec 2017 00:58:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753389AbdLFA6A (ORCPT ); Tue, 5 Dec 2017 19:58:00 -0500 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:47480 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753605AbdLFA5z (ORCPT ); Tue, 5 Dec 2017 19:57:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1512521876; x=1544057876; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=4vruza9XB1z6MylPSqwRF2rceN/JTayHcAnWtHqM5eg=; b=Z6ptmombXB7089RXXzvZlI9JrIEgM6vPK+J3MH6gyUFObFMcYoP1fYrn jI6nl3YQPwN1mgzWDP5BpeHsKxit38HomuR8Crzx+ZUCqjbFKOuko5wMT p3vueIB7qR5xQt+YHX/EdP/4JSrLuCZpgYLLKIcyL2eNgI0Sbweh/aKUd zvZcXqv/PSqUIhrsYarDOqGR07X6AqfVCskLJ2/BqPt2iRp+AbiUquTWy RLG22bZG19TbXmzk+GkbF+QqNbLK7ZLlFKIfTmqoarPveb1g928eHk1iX r41dXBnRVPU/AueLcjjYzUTgFGYUOIQiJqKDnS8cMUVzhwHnKqvnSMTCZ w==; X-IronPort-AV: E=Sophos;i="5.45,366,1508774400"; d="scan'208";a="64068920" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 06 Dec 2017 08:57:55 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 05 Dec 2017 16:55:04 -0800 Received: from thinkpad-bart.sdcorp.global.sandisk.com (HELO thinkpad-bart.int.fusionio.com) ([10.11.166.51]) by uls-op-cesaip02.wdc.com with ESMTP; 05 Dec 2017 16:57:55 -0800 From: Bart Van Assche To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Ming Lei , Hannes Reinecke , Johannes Thumshirn , "Martin K . Petersen" , stable@vger.kernel.org Subject: [PATCH v2 2/3] blk-mq-debugfs: Also show requests that have not yet been started Date: Tue, 5 Dec 2017 16:57:52 -0800 Message-Id: <20171206005753.28734-3-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171206005753.28734-1-bart.vanassche@wdc.com> References: <20171206005753.28734-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 When debugging e.g. the SCSI timeout handler it is important that requests that have not yet been started or that already have completed are also reported through debugfs. Fixes: commit 2720bab50258 ("blk-mq-debugfs: Show busy requests") Signed-off-by: Bart Van Assche Cc: Ming Lei Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Martin K. Petersen Cc: stable@vger.kernel.org --- block/blk-mq-debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c index f7db73f1698e..886b37163f17 100644 --- a/block/blk-mq-debugfs.c +++ b/block/blk-mq-debugfs.c @@ -409,7 +409,7 @@ static void hctx_show_busy_rq(struct request *rq, void *data, bool reserved) const struct show_busy_params *params = data; if (blk_mq_map_queue(rq->q, rq->mq_ctx->cpu) == params->hctx && - test_bit(REQ_ATOM_STARTED, &rq->atomic_flags)) + list_empty(&rq->queuelist)) __blk_mq_debugfs_rq_show(params->m, list_entry_rq(&rq->queuelist)); }