mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +00:00
qemu: Support sgio setting for volume type disk
This commit is contained in:
parent
464d4e559c
commit
a9762b730b
@ -996,9 +996,18 @@ qemuCheckSharedDisk(virHashTablePtr sharedDisks,
|
|||||||
disk->sgio == VIR_DOMAIN_DISK_SGIO_UNFILTERED))
|
disk->sgio == VIR_DOMAIN_DISK_SGIO_UNFILTERED))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
virReportError(VIR_ERR_OPERATION_INVALID,
|
if (disk->type == VIR_DOMAIN_DISK_TYPE_VOLUME) {
|
||||||
_("sgio of shared disk '%s' conflicts with other "
|
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
"active domains"), disk->src);
|
_("sgio of shared disk 'pool=%s' 'volume=%s' conflicts "
|
||||||
|
"with other active domains"),
|
||||||
|
disk->srcpool->pool,
|
||||||
|
disk->srcpool->volume);
|
||||||
|
} else {
|
||||||
|
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
|
_("sgio of shared disk '%s' conflicts with other "
|
||||||
|
"active domains"), disk->src);
|
||||||
|
}
|
||||||
|
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
@ -3235,9 +3235,12 @@ qemuSetUnprivSGIO(virDomainDiskDefPtr disk)
|
|||||||
/* "sgio" is only valid for block disk; cdrom
|
/* "sgio" is only valid for block disk; cdrom
|
||||||
* and floopy disk can have empty source.
|
* and floopy disk can have empty source.
|
||||||
*/
|
*/
|
||||||
if (disk->type != VIR_DOMAIN_DISK_TYPE_BLOCK ||
|
if (!disk->src ||
|
||||||
disk->device != VIR_DOMAIN_DISK_DEVICE_LUN ||
|
disk->device != VIR_DOMAIN_DISK_DEVICE_LUN ||
|
||||||
!disk->src)
|
(disk->type != VIR_DOMAIN_DISK_TYPE_BLOCK &&
|
||||||
|
!(disk->type == VIR_DOMAIN_DISK_TYPE_VOLUME &&
|
||||||
|
disk->srcpool &&
|
||||||
|
disk->srcpool->voltype == VIR_STORAGE_VOL_BLOCK)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
sysfs_path = virGetUnprivSGIOSysfsPath(disk->src, NULL);
|
sysfs_path = virGetUnprivSGIOSysfsPath(disk->src, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user