[PATCH] nvme-core: decode the error on add disk()

Ewan Milne emilne at redhat.com
Mon Jan 20 08:57:27 PST 2025


On Thu, Jan 16, 2025 at 3:19 PM Chaitanya Kulkarni <kch at nvidia.com> wrote:
>
> While debugging the problem, it is important to know that what exact
> error returned by device_add_disk() along side the disk name. Print
> the error along with disk name when device_add_disk() fails when
> allocating the namespace.

This is fine as far as it goes.  Looking at the code around namespace scanning
there appear to be several other places where an error is silently handled and
the namespace won't show up.  e.g. if nvme_get_effects_log() -> nvme_get_log()
fails in nvme_alloc_ns_head().  That is beyond the intent of this one
patch though.

Reviewed-by: Ewan D. Milne <emilne at redhat.com>




More information about the Linux-nvme mailing list