Re: [PATCH 2/2] node_device: Treat NVMe disks as regular disks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 26, 2022 at 14:13:21 +0100, Michal Privoznik wrote:
> Unfortunately, udev doesn't set ID_TYPE attribute for NVMe disks,
> therefore we have to add another case into udevKludgeStorageType()
> to treat /dev/nvme* devlinks as any other disk.

I had to do a bit digging because /dev/nvme0 a controller and not a
storage device, but it turns out the function below is called only for
the namespace portion which is a storage device and not even the
partition portion, so the code itself is good.

> 
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2045953
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/node_device/node_device_udev.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
> index 14acb3fee0..27efda1ab0 100644
> --- a/src/node_device/node_device_udev.c
> +++ b/src/node_device/node_device_udev.c
> @@ -900,6 +900,9 @@ udevKludgeStorageType(virNodeDeviceDef *def)
>           * ID_TYPE=disk does not exist on DASDs they fall through
>           * the udevProcessStorage detection logic. */
>          { "/dev/dasd", "dasd" },
> +
> +        /* NVMe disk */

e.g. for example note here that this is called for /dev/nvme0n1 and
alike only so doing a prefix match is okay.

> +        { "/dev/nvme", "disk" },
>      };
>  
>      VIR_DEBUG("Could not find definitive storage type for device "

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux