Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4166739imd; Mon, 29 Oct 2018 19:42:37 -0700 (PDT) X-Google-Smtp-Source: AJdET5czACLrTQx8hU4ST44jsSVXA4hIK+4m6en3NkeZAYs3rb9DpiF5kuzwsEFCsSk32Wn+HrgR X-Received: by 2002:a17:902:7207:: with SMTP id ba7-v6mr2695037plb.44.1540867357924; Mon, 29 Oct 2018 19:42:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540867357; cv=none; d=google.com; s=arc-20160816; b=AYC6pKBN1/pYyEJ9W6bfy8YXsDRPZME2zpPfACQcx78HcGzQTqWTTukqCCIOmB02Rg 1wOPPKz+AyrexDGpp5DJ0UX55fCL2XweW4KEcjzIG8YwqcYVk1zOk/2HYORw32JnmZp2 VBV3keqd4dOezH4pTWfDRYNLn10eZo1PABa7+T/ZYCngIK2xFpipURJUbzLDYoKD6YvR U+N+mIYSTy95uXvIYp+JQaDR8GJFIJ0vtmskGW5oZ5Om9iw6lLhKxsV3vRaGMk31OFoR 4tXE1GxURb1JYFlix42MIe7KFwjH4yh/HfvqQV1GerWpkQeuYPhMPcPdJrdv0fmEe8M0 5LLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=knBJ1KE2Y2vLaXha21rRHr9h4xo403UlYab8On95gsQ=; b=LZasaIV2old1bzCc6xdbAMo4+oITrGFaiXi0ZbWGdLliHliuOMUqxU/nv5YwBMYV1a EvgKlMJ80WrZxGAN1unvZxuzhXe4dzVNyf8n05OoXGxNiJfuaNnsQOInYShgTMr+3ble 1ksRRzY0kgmaIx9dDf/SGA1hjiQb4LHtTMaCSFT8NV2eWM4+r3kMy6ZBp4poE8N4d2HZ A6HAiMXXjZ/Bma3gB1BrGyGLqmX2jPEVlozRoigeYyKH51tGFtrCKEtcxtQ420ZhZRIw C3CzZhi001Vq9eR0b4pLfrSAqVkgPih4K8qLOikso9JIpNawXLKF59+rLilsiJrmENj1 ag+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amzn.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b24-v6si14928838pgb.50.2018.10.29.19.42.22; Mon, 29 Oct 2018 19:42:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amzn.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727065AbeJ3LcK (ORCPT + 99 others); Tue, 30 Oct 2018 07:32:10 -0400 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:33803 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726692AbeJ3LcD (ORCPT ); Tue, 30 Oct 2018 07:32:03 -0400 X-IronPort-AV: E=Sophos;i="5.54,442,1534809600"; d="scan'208";a="639170512" Received: from sea3-co-svc-lb6-vlan3.sea.amazon.com (HELO email-inbound-relay-1d-f273de60.us-east-1.amazon.com) ([10.47.22.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Oct 2018 02:40:27 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan3.iad.amazon.com [10.40.159.166]) by email-inbound-relay-1d-f273de60.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id w9U2ePiT102751 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 30 Oct 2018 02:40:25 GMT Received: from EX13D12UEA001.ant.amazon.com (10.43.61.99) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 30 Oct 2018 02:40:25 +0000 Received: from EX13MTAUEA001.ant.amazon.com (10.43.61.82) by EX13D12UEA001.ant.amazon.com (10.43.61.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 30 Oct 2018 02:40:25 +0000 Received: from localhost (172.23.204.141) by mail-relay.amazon.com (10.43.61.243) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 30 Oct 2018 02:40:24 +0000 From: Balbir Singh To: CC: , , "Balbir Singh" Subject: [PATCH] Add cmd_flags to print_req_error Date: Tue, 30 Oct 2018 02:40:15 +0000 Message-ID: <20181030024015.1092-1-sblbir@amzn.com> X-Mailer: git-send-email 2.16.2 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I ran into a bug where after hibernation due to incompatible backends, the block driver returned BLK_STS_NOTSUPP, with the current message it's hard to find out what the command flags were. Adding req->cmd_flags help make the problem easier to diagnose. Signed-off-by: Balbir Singh Reviewed-by: Eduardo Valentin --- Testing: Compile tested at my end Changelog - convert %llx to %x and remove casting to unsigned long long block/blk-core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index cdfabc5646da..0fd6104bb0d2 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -256,10 +256,11 @@ static void print_req_error(struct request *req, blk_status_t status) if (WARN_ON_ONCE(idx >= ARRAY_SIZE(blk_errors))) return; - printk_ratelimited(KERN_ERR "%s: %s error, dev %s, sector %llu\n", - __func__, blk_errors[idx].name, req->rq_disk ? - req->rq_disk->disk_name : "?", - (unsigned long long)blk_rq_pos(req)); + printk_ratelimited(KERN_ERR "%s: %s error, dev %s, sector %llu flags %x\n", + __func__, blk_errors[idx].name, + req->rq_disk ? req->rq_disk->disk_name : "?", + (unsigned long long)blk_rq_pos(req), + req->cmd_flags); } static void req_bio_endio(struct request *rq, struct bio *bio, -- 2.16.2