mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
Rename virDomainDiskSGIO to virDomainDeviceSGIO
SCSI host device will also support "sgio", and perhaps we could use "sgio" in other places too in future, renaming the enum to reuse.
This commit is contained in:
parent
1d94b3e760
commit
ead4391562
@ -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")
|
||||
@ -5069,7 +5069,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;
|
||||
@ -13711,7 +13711,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
|
||||
const char *ioeventfd = virDomainIoEventFdTypeToString(def->ioeventfd);
|
||||
const char *event_idx = virDomainVirtioEventIdxTypeToString(def->event_idx);
|
||||
const char *copy_on_read = virDomainDiskCopyOnReadTypeToString(def->copy_on_read);
|
||||
const char *sgio = virDomainDiskSGIOTypeToString(def->sgio);
|
||||
const char *sgio = virDomainDeviceSGIOTypeToString(def->sgio);
|
||||
const char *discard = virDomainDiskDiscardTypeToString(def->discard);
|
||||
|
||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
enum virDomainDiskDiscard {
|
||||
@ -715,7 +715,7 @@ struct _virDomainDiskDef {
|
||||
virStorageEncryptionPtr encryption;
|
||||
bool rawio_specified;
|
||||
int rawio; /* no = 0, yes = 1 */
|
||||
int sgio; /* enum virDomainDiskSGIO */
|
||||
int sgio; /* enum virDomainDeviceSGIO */
|
||||
int discard; /* enum virDomainDiskDiscard */
|
||||
|
||||
size_t nseclabels;
|
||||
@ -2472,7 +2472,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(virDomainDiskDiscard)
|
||||
VIR_ENUM_DECL(virDomainIoEventFd)
|
||||
|
@ -1025,10 +1025,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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user