[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/25] block/nvme: Report warning with warn_report()
From: |
Keith Busch |
Subject: |
Re: [PATCH 03/25] block/nvme: Report warning with warn_report() |
Date: |
Tue, 27 Oct 2020 07:45:23 -0700 |
On Tue, Oct 27, 2020 at 02:55:25PM +0100, Philippe Mathieu-Daudé wrote:
> Instead of displaying warning on stderr, use warn_report()
> which also displays it on the monitor.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> block/nvme.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/block/nvme.c b/block/nvme.c
> index 739a0a700cb..6f1d7f9b2a1 100644
> --- a/block/nvme.c
> +++ b/block/nvme.c
> @@ -399,8 +399,8 @@ static bool nvme_process_completion(NVMeQueuePair *q)
> }
> cid = le16_to_cpu(c->cid);
Not related to your patch, but it stands out as odd that this is treated
as an endian type. The field is just an opaque cookie, so there shouldn't
be a need for byte swapping. It in fact looks like this is broken on a
big-endian host, as the swaping on submission uses a 32-bit value. Won't
that truncate the relavant bits?
> if (cid == 0 || cid > NVME_QUEUE_SIZE) {
> - fprintf(stderr, "Unexpected CID in completion queue: %" PRIu32
> "\n",
> - cid);
> + warn_report("NVMe: Unexpected CID in completion queue:
> %"PRIu32", "
> + "queue size: %u", cid, NVME_QUEUE_SIZE);
> continue;
> }
> trace_nvme_complete_command(s, q->index, cid);
- [PATCH 00/25] block/nvme: Fix Aarch64 host, Philippe Mathieu-Daudé, 2020/10/27
- [PATCH 01/25] MAINTAINERS: Cover 'block/nvme.h' file, Philippe Mathieu-Daudé, 2020/10/27
- [PATCH 02/25] block/nvme: Use hex format to display offset in trace events, Philippe Mathieu-Daudé, 2020/10/27
- [PATCH 03/25] block/nvme: Report warning with warn_report(), Philippe Mathieu-Daudé, 2020/10/27
- Re: [PATCH 03/25] block/nvme: Report warning with warn_report(),
Keith Busch <=
- Re: [PATCH 03/25] block/nvme: Report warning with warn_report(), Auger Eric, 2020/10/28
- Re: [PATCH 03/25] block/nvme: Report warning with warn_report(), Stefan Hajnoczi, 2020/10/28
- [PATCH 04/25] block/nvme: Trace controller capabilities, Philippe Mathieu-Daudé, 2020/10/27
[PATCH 05/25] block/nvme: Trace nvme_poll_queue() per queue, Philippe Mathieu-Daudé, 2020/10/27