mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Revert "qemu: Check duplicate WWNs also for hotplugged disks"
Similarly to commit5da28cc306this check actually does not make sense since duplicate WWNs are used e.g. when multipathing disks. This reverts commit780fe4e4ba.
This commit is contained in:
@@ -25510,34 +25510,6 @@ virDomainDeviceInfoCheckBootIndex(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* virDomainDefGetDiskByWWN:
|
||||
* @def: domain definition
|
||||
* @wwn: wwn of a disk to find
|
||||
*
|
||||
* Returns a disk definition pointer corresponding to the given WWN identifier
|
||||
* or NULL either if @wwn was NULL or if disk with given WWN is not present in
|
||||
* the domain definition.
|
||||
*/
|
||||
static virDomainDiskDefPtr
|
||||
virDomainDefGetDiskByWWN(virDomainDefPtr def,
|
||||
const char *wwn)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
if (!wwn)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < def->ndisks; i++) {
|
||||
if (STREQ_NULLABLE(def->disks[i]->wwn, wwn))
|
||||
return def->disks[i];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
virDomainDefCompatibleDevice(virDomainDefPtr def,
|
||||
virDomainDeviceDefPtr dev,
|
||||
@@ -25581,15 +25553,6 @@ virDomainDefCompatibleDevice(virDomainDefPtr def,
|
||||
}
|
||||
}
|
||||
|
||||
if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
|
||||
if (!!virDomainDefGetDiskByWWN(def, dev->data.disk->wwn)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Domain already has a disk with wwn '%s'"),
|
||||
dev->data.disk->wwn);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user