block/nvme: Fix bdrv_refresh_filename()
commitcc61b0740f9b99942f18cc850eeffa302f4f328e
authorMax Reitz <mreitz@redhat.com>
Fri, 1 Feb 2019 19:29:30 +0000 (1 20:29 +0100)
committerMax Reitz <mreitz@redhat.com>
Mon, 25 Feb 2019 14:11:27 +0000 (25 15:11 +0100)
treebcd43706b0079e26644ce3fb301113181105332a
parentfb695c74aa43c9bdc67b3079cddec1cc8e1b913e
block/nvme: Fix bdrv_refresh_filename()

Currently, nvme's bdrv_refresh_filename() is an exact copy of null's
implementation.  However, for null, "null-co://" and "null-aio://" are
indeed valid filenames -- for nvme, they are not, as a device address is
still required.

The correct implementation should generate a filename of the form
"nvme://[PCI address]/[namespace]" (as the comment above
nvme_parse_filename() describes).

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-id: 20190201192935.18394-27-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/nvme.c