From patchwork Tue Dec 5 00:38:09 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: 10091777 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 1B19360329 for ; Tue, 5 Dec 2017 00:38:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E12829114 for ; Tue, 5 Dec 2017 00:38:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02B50294CD; Tue, 5 Dec 2017 00:38:16 +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=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 B69F9294CC for ; Tue, 5 Dec 2017 00:38:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752127AbdLEAiP (ORCPT ); Mon, 4 Dec 2017 19:38:15 -0500 Received: from esa4.hgst.iphmx.com ([216.71.154.42]:4603 "EHLO esa4.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752073AbdLEAiL (ORCPT ); Mon, 4 Dec 2017 19:38:11 -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=1512434292; x=1543970292; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=dmEG3V5l82wm3cdBXQZo6FO8kYhlCJIHGUpa4XWAOF8=; b=TVTxdk7EHt2DWxAbk958R2kxtJhwvs+8QnhUsO/1HdKgRa30CteNvS9v LpNi3XUwa0JAnAyexHkVRr5t4qqRZWj5oMVN0Z3cF0R837Z3ceYwRTBXR u2+7uah3FTC4siB5mEkfsQuSCB+DDK/BogP6WkrK3KSKAR/pZL7hp7nOR CAqEJQgMcvJWQlE9om7MSvVhoicJIIwH0J2Yq8f+ttQW+cKiL4qllAlBq eAHh11pZN26JQA0abK+Gwq2Q49wvq84NCwL/1bXoWxnG4PSxB/HNoAcBU Dc/MhK2MU5uFP0XLFzz7tRhS1zyLIkqkRvyml1U83C5LwFD/MtQvwY7YQ Q==; X-IronPort-AV: E=Sophos;i="5.45,362,1508774400"; d="scan'208";a="63968935" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 05 Dec 2017 08:38:11 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 04 Dec 2017 16:35:22 -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; 04 Dec 2017 16:38:11 -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" Subject: [PATCH 2/2] blk-mq-debugfs: Also show requests that have not yet been started Date: Mon, 4 Dec 2017 16:38:09 -0800 Message-Id: <20171205003809.1705-3-bart.vanassche@wdc.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171205003809.1705-1-bart.vanassche@wdc.com> References: <20171205003809.1705-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. Signed-off-by: Bart Van Assche Cc: Ming Lei Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Martin K. Petersen --- 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)); }