From: Balbir Singh <sblbir@amzn.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Balbir Singh <sblbir@amazon.com>, <linux-block@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Add cmd_flags to print_req_error
Date: Tue, 30 Oct 2018 02:53:29 +0000 [thread overview]
Message-ID: <20181030025329.GA2121@dev-dsk-sblbir-2a-88e651b2.us-west-2.amazon.com> (raw)
In-Reply-To: <543de76a-e43a-9f4d-c781-e3251ea0e749@kernel.dk>
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
>
>
next prev parent reply other threads:[~2018-10-30 2:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-29 0:57 [PATCH] Add cmd_flags to print_req_error Balbir Singh
2018-10-29 22:39 ` Jens Axboe
2018-10-30 2:53 ` Balbir Singh [this message]
2018-10-30 2:40 Balbir Singh
2018-10-30 9:37 ` Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181030025329.GA2121@dev-dsk-sblbir-2a-88e651b2.us-west-2.amazon.com \
--to=sblbir@amzn.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sblbir@amazon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).