Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4479966imd; Tue, 30 Oct 2018 02:38:44 -0700 (PDT) X-Google-Smtp-Source: AJdET5cI+u5WoCD1GdVdBd/SZcXTUa5KcmV0ZqBOTvb0g3/cXZ2NKlBG94+mAO/Gmv+ANnpkRxAP X-Received: by 2002:a65:430b:: with SMTP id j11-v6mr3973956pgq.269.1540892324056; Tue, 30 Oct 2018 02:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540892324; cv=none; d=google.com; s=arc-20160816; b=ibIWbswzh/tlw/7LugTRkRPGuGQfgUYP7F10ch08WPwtHI4dtGF+p7IBPyO8c6T3HJ PqPYlV923g/r/wf+j0Xbd1b/7j9uLBOIZvSyk2OaCHiGKHpZgxS/a75vQehuksj0KYqY KSNe43xD7NZf9igk66KwOQpcFSNqiVf93yHOu0qaFDbGQ7qUTXBAhB4XSwoDVIuwuy20 Ap5KCW2sKyDkXI/Jqscxhf2uwA0QXUcFUh0pDQem2sjRlBbW+g5LyKfzLsKEEFzXUhn6 ihwsA6ohSqoh7LVoWGOsn73mrjzrtH+Spxwvp+JeiBCCImelv4o3EOWAMCDnMCecsN+s sTtA== 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=J8shnafqtPaitbWOckfsWlK0eAx68Oq1IIrrjyhKn2E=; b=ticcgBbZ0ywPI5X6UfnmLdmhnTIxV/Ku9h3/0T8rbnRYsZ+2qIvfUe0NVgES6IT3YE Y9iRm+DxA4NDhqy+4iUyzn0ReQD1W+j67n7nxCo5pbeos996L30IpmeHv1PzfwqmsQ4S ptvt/gaPcGFBOaQBrkF/s0u1geaKtg40+iRFq5R6RvGB/AhI3sE693coExsOGm5/LWIU fUb30MbMwtFIWJKeaApwIBR7PFc0Bi2rhmkTTcOR6Hx9ZcaUIFIkqC2qOCU8vEvaSx4A qGUfftergZ3n2kAoQsqhWlfX/lmk6fxs+xw4Z09MvpgE+UndvOkWX47iCFxiyWI9wRCd rZnA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w185-v6si22491486pfb.21.2018.10.30.02.38.28; Tue, 30 Oct 2018 02:38:44 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726788AbeJ3SaZ (ORCPT + 99 others); Tue, 30 Oct 2018 14:30:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54668 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726529AbeJ3SaZ (ORCPT ); Tue, 30 Oct 2018 14:30:25 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 83A063001971; Tue, 30 Oct 2018 09:37:43 +0000 (UTC) Received: from ming.t460p (ovpn-8-20.pek2.redhat.com [10.72.8.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DB08619745; Tue, 30 Oct 2018 09:37:38 +0000 (UTC) Date: Tue, 30 Oct 2018 17:37:34 +0800 From: Ming Lei To: Balbir Singh Cc: axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Add cmd_flags to print_req_error Message-ID: <20181030093708.GC13582@ming.t460p> References: <20181030024015.1092-1-sblbir@amzn.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181030024015.1092-1-sblbir@amzn.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 30 Oct 2018 09:37:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 30, 2018 at 02:40:15AM +0000, 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. > > 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 > Looks fine: Reviewed-by: Ming Lei -- Ming