1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

device_id: handle qemu wwid

Ignore made-up wwid values reported for qemu devices
that contain the string "QEMU HARDDISK".  The devname
will be used as the device id.
This commit is contained in:
David Teigland 2021-06-24 11:30:46 -05:00
parent 84bd394cf9
commit 73a05c8f02

View File

@ -312,6 +312,10 @@ const char *device_id_system_read(struct cmd_context *cmd, struct device *dev, u
/* scsi_debug wwid begins "t10.Linux scsi_debug ..." */ /* scsi_debug wwid begins "t10.Linux scsi_debug ..." */
if (strstr(sysbuf, "scsi_debug")) if (strstr(sysbuf, "scsi_debug"))
sysbuf[0] = '\0'; sysbuf[0] = '\0';
/* qemu wwid begins "t10.ATA QEMU HARDDISK ..." */
if (strstr(sysbuf, "QEMU HARDDISK"))
sysbuf[0] = '\0';
} }
else if (idtype == DEV_ID_TYPE_SYS_SERIAL) else if (idtype == DEV_ID_TYPE_SYS_SERIAL)