Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4175064imd; Mon, 29 Oct 2018 19:54:28 -0700 (PDT) X-Google-Smtp-Source: AJdET5dY8LtLFt7mbAqGce+a8/7G2KC5eMpruznzQ5dZFt1e4zvaGT/xzCAMGvmLwGWc+5B3Sp+I X-Received: by 2002:a62:1112:: with SMTP id z18-v6mr1074527pfi.200.1540868068861; Mon, 29 Oct 2018 19:54:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540868068; cv=none; d=google.com; s=arc-20160816; b=KGVCyDTuzbhNKq/i5DrW45Flxrdkzfa/CMQ+JsHnUdrnXxWBS7QPSmTgoUhvvoe6nO nBl09aM6Nlu/FMsWWJB66RAYouJNc7jDZ/rnZPtCZnWJFAYodPDx/xhB+HIxYVl4B+BQ S+aILI7nJbHDJ5+RJJP6sbQAYvRbV15Tahqw7LYLkfVGegW95riXghifq37jHRtp/VaG j3yhVO+RB1luq5KaBj/PCvlxcPFiewG99P8orT14J7OdR/z2mpu7As144s1/6p1mHIqH AETNa52F39eVshVJsKAlILoJxTvilRu/+Zeu9iECrDXwaT0AnOIl6IYA/TdBTM3H5jCO 8g0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=dGMlOoTnOFkgD4nnfXgmFiKtxZWjXelfJ8cz4fcPmU4=; b=BaSHTivGOIBNyWvaNHgrsn01kq58VQQQRbLi3XIulIEj4AEKEWZz+lt9hXnGjh9mFZ xGV9u9xbKBX0iWFwS8lLntlWheJL972fNvQ8LIDGDpolA+JfSrxvQXGuQ5U5AXZjRLR3 3ZbQh08JJ1367ZE01N/GqCHuuxlzE0CuyZGw2jOtOO2OQ8zMsyCKOYL6rcjw90pGE8Ze EtE5csrm+lHED9Iu11W4xbi2HFaT2SAsfTuuX/pQJ3VKGUY3HBTHK9lCJA9Q+B+Srvph 2kX+9cE0lCi2gzEhDhEAKazaED/N0/47YDy8HWdMCAhAj7h3mX74F4/jDRIIoqMDGkyx eILA== 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 u8-v6si14114058pgl.59.2018.10.29.19.54.13; Mon, 29 Oct 2018 19:54:28 -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 S1726249AbeJ3LpJ (ORCPT + 99 others); Tue, 30 Oct 2018 07:45:09 -0400 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:55058 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbeJ3LpI (ORCPT ); Tue, 30 Oct 2018 07:45:08 -0400 X-IronPort-AV: E=Sophos;i="5.54,442,1534809600"; d="scan'208";a="371008309" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2c-c6afef2e.us-west-2.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 30 Oct 2018 02:53:32 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan3.pdx.amazon.com [10.236.137.198]) by email-inbound-relay-2c-c6afef2e.us-west-2.amazon.com (8.14.7/8.14.7) with ESMTP id w9U2rQxx087460 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 30 Oct 2018 02:53:30 GMT Received: from EX13D01UWB003.ant.amazon.com (10.43.161.94) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 30 Oct 2018 02:53:29 +0000 Received: from EX13MTAUWB001.ant.amazon.com (10.43.161.207) by EX13d01UWB003.ant.amazon.com (10.43.161.94) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 30 Oct 2018 02:53:28 +0000 Received: from localhost (172.23.204.141) by mail-relay.amazon.com (10.43.161.249) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 30 Oct 2018 02:53:28 +0000 Date: Tue, 30 Oct 2018 02:53:29 +0000 From: Balbir Singh To: Jens Axboe CC: Balbir Singh , , Subject: Re: [PATCH] Add cmd_flags to print_req_error Message-ID: <20181030025329.GA2121@dev-dsk-sblbir-2a-88e651b2.us-west-2.amazon.com> References: <20181029005732.21040-1-sblbir@amazon.com> <543de76a-e43a-9f4d-c781-e3251ea0e749@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <543de76a-e43a-9f4d-c781-e3251ea0e749@kernel.dk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 29, 2018 at 04:39:05PM -0600, Jens Axboe wrote: > On 10/28/18 6:57 PM, Balbir Singh wrote: > > 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. > > I recently did the same thing to debug something, so I like > this change. One comment: > > > + printk_ratelimited(KERN_ERR "%s: %s error, dev %s, sector %llu flags %llx\n", > > + __func__, blk_errors[idx].name, > > + req->rq_disk ? req->rq_disk->disk_name : "?", > > + (unsigned long long)blk_rq_pos(req), > > + (unsigned long long)req->cmd_flags); > > Why are you casting it to unsigned long long for printing? A simple > %x should suffice, no cast necessary. > Thanks! resent I was looking at blk_dump_rq_flags() and tried to do something similar. I agree a %x is sufficient, I was trying to be consistent. We can fix that path up if needed. > -- > Jens Axboe > >