SCSI host device will also support "sgio", and perhaps we could use "sgio" in other places too in future, renaming the enum to reuse. --- src/conf/domain_conf.c | 6 +++--- src/conf/domain_conf.h | 14 +++++++------- src/qemu/qemu_conf.c | 6 +++--- src/qemu/qemu_process.c | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index e7b096b..9823b9c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -274,7 +274,7 @@ VIR_ENUM_IMPL(virDomainDiskIo, VIR_DOMAIN_DISK_IO_LAST, "native", "threads") -VIR_ENUM_IMPL(virDomainDiskSGIO, VIR_DOMAIN_DISK_SGIO_LAST, +VIR_ENUM_IMPL(virDomainDeviceSGIO, VIR_DOMAIN_DEVICE_SGIO_LAST, "default", "filtered", "unfiltered") @@ -5061,7 +5061,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt, } if (sgio) { - if ((def->sgio = virDomainDiskSGIOTypeFromString(sgio)) <= 0) { + if ((def->sgio = virDomainDeviceSGIOTypeFromString(sgio)) <= 0) { virReportError(VIR_ERR_XML_ERROR, _("unknown disk sgio mode '%s'"), sgio); goto error; @@ -13745,7 +13745,7 @@ virDomainDiskDefFormat(virBufferPtr buf, const char *ioeventfd = virDomainIoEventFdTypeToString(def->ioeventfd); const char *event_idx = virDomainVirtioEventIdxTypeToString(def->event_idx); const char *copy_on_read = virDomainVirtioEventIdxTypeToString(def->copy_on_read); - const char *sgio = virDomainDiskSGIOTypeToString(def->sgio); + const char *sgio = virDomainDeviceSGIOTypeToString(def->sgio); char uuidstr[VIR_UUID_STRING_BUFLEN]; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 7073967..59cf6a7 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -618,12 +618,12 @@ enum virDomainDiskSecretType { VIR_DOMAIN_DISK_SECRET_TYPE_LAST }; -enum virDomainDiskSGIO { - VIR_DOMAIN_DISK_SGIO_DEFAULT = 0, - VIR_DOMAIN_DISK_SGIO_FILTERED, - VIR_DOMAIN_DISK_SGIO_UNFILTERED, +enum virDomainDeviceSGIO { + VIR_DOMAIN_DEVICE_SGIO_DEFAULT = 0, + VIR_DOMAIN_DEVICE_SGIO_FILTERED, + VIR_DOMAIN_DEVICE_SGIO_UNFILTERED, - VIR_DOMAIN_DISK_SGIO_LAST + VIR_DOMAIN_DEVICE_SGIO_LAST }; typedef struct _virDomainBlockIoTuneInfo virDomainBlockIoTuneInfo; @@ -707,7 +707,7 @@ struct _virDomainDiskDef { virStorageEncryptionPtr encryption; bool rawio_specified; int rawio; /* no = 0, yes = 1 */ - int sgio; /* enum virDomainDiskSGIO */ + int sgio; /* enum virDomainDeviceSGIO */ size_t nseclabels; virSecurityDeviceLabelDefPtr *seclabels; @@ -2458,7 +2458,7 @@ VIR_ENUM_DECL(virDomainDiskProtocol) VIR_ENUM_DECL(virDomainDiskProtocolTransport) VIR_ENUM_DECL(virDomainDiskIo) VIR_ENUM_DECL(virDomainDiskSecretType) -VIR_ENUM_DECL(virDomainDiskSGIO) +VIR_ENUM_DECL(virDomainDeviceSGIO) VIR_ENUM_DECL(virDomainDiskTray) VIR_ENUM_DECL(virDomainIoEventFd) VIR_ENUM_DECL(virDomainVirtioEventIdx) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index ebcd176..67b6d82 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -993,10 +993,10 @@ qemuCheckSharedDisk(virHashTablePtr sharedDevices, } if ((val == 0 && - (disk->sgio == VIR_DOMAIN_DISK_SGIO_FILTERED || - disk->sgio == VIR_DOMAIN_DISK_SGIO_DEFAULT)) || + (disk->sgio == VIR_DOMAIN_DEVICE_SGIO_FILTERED || + disk->sgio == VIR_DOMAIN_DEVICE_SGIO_DEFAULT)) || (val == 1 && - disk->sgio == VIR_DOMAIN_DISK_SGIO_UNFILTERED)) + disk->sgio == VIR_DOMAIN_DEVICE_SGIO_UNFILTERED)) goto cleanup; if (disk->type == VIR_DOMAIN_DISK_TYPE_VOLUME) { diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 117c669..28427af 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3226,7 +3226,7 @@ qemuSetUnprivSGIO(virDomainDiskDefPtr disk) return -1; /* By default, filter the SG_IO commands, i.e. set unpriv_sgio to 0. */ - val = (disk->sgio == VIR_DOMAIN_DISK_SGIO_UNFILTERED); + val = (disk->sgio == VIR_DOMAIN_DEVICE_SGIO_UNFILTERED); /* Do not do anything if unpriv_sgio is not supported by the kernel and the * whitelist is enabled. But if requesting unfiltered access, always call -- 1.8.1.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list