[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <543de76a-e43a-9f4d-c781-e3251ea0e749@kernel.dk>
Date: Mon, 29 Oct 2018 16:39:05 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Balbir Singh <sblbir@...zon.com>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Add cmd_flags to print_req_error
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.
--
Jens Axboe
Powered by blists - more mailing lists