mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
qemu: domain: Forbid slice/encryption/copy_on_read with disk type='lun'
Any non-raw block layer feature will not work with raw SCSI command passthrough via 'scsi-block'. Explicitly refuse use of luks encryption, storage slices and copy on read. https://bugzilla.redhat.com/show_bug.cgi?id=1820040 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
b40ec75296
commit
5d72c3ce28
@ -10487,6 +10487,19 @@ qemuDomainDefValidateDiskLunSource(const virStorageSource *src)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (src->sliceStorage) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("disk device 'lun' doesn't support storage slice"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (src->encryption &&
|
||||
src->encryption->format != VIR_STORAGE_ENCRYPTION_FORMAT_DEFAULT) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("disk device 'lun' doesn't support encryption"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1997,6 +1997,13 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDomainDiskDef *disk,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (disk->copy_on_read == VIR_TRISTATE_SWITCH_ON) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("copy_on_read is not compatible with 'lun' disk '%s'"),
|
||||
disk->dst);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (qemuDomainDefValidateDiskLunSource(disk->src) < 0)
|
||||
return -1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user