- 05 3月, 2019 9 次提交
-
-
由 Cole Robinson 提交于
<filesystem> devices lack the model= attribute which is used by most other device types. To eventually support virtio-9p-pci-{non-}traditional in qemu, let's add a standard model= attribute. The accepted values are: - virtio - virtio-transitional - virtio-non-transitional Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Add new <rng> model values for virtio transitional devices. Ex: <rng model='virtio-transitional'> ... </rng> * "virtio-transitional" maps to qemu "virtio-rng-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-rng-pci-non-transitional" Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Add <hostdev> protocol=vhost model handling for virtio transitional devices. Ex: <hostdev mode='subsystem' type='scsi_host' model='virtio-transitional'> <source protocol='vhost' wwpn=X/> </hostdev> * "virtio-transitional" maps to qemu "vhost-scsi-pci-transitional" * "virtio-non-transitional" maps to qemu "vhost-scsi-pci-non-transitional" Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
qemu vhost-scsi devices map to XML roughly like: <hostdev mode='subsystem' type='scsi_host'> <source protocol='vhost' wwpn=X/> </hostdev> To support vhost-scsi-pci-{non-}traditional in qemu, we need to to extend the SCSI Host hostdev XML to handle model= value. This matches the XML model= format used for mediated devices. This is just the domain_conf bits and some XML test cases. Use of virtio-X naming here does not match the hostdev protocol=vhost nor does it match the qemu vhost-X device naming, however it's more consistent with all other model= names in this area, and also matches the inconsistency of <vsock> devices which use model=virtio but map to vhost-vsock on the qemu commandline Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Add new <interface> model handling for virtio transitional devices. Ex: <interface> <model type='virtio-transitional'/> </interface> * "virtio-transitional" maps to qemu "virtio-net-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-net-pci-non-transitional" Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Add new <disk> model values for virtio transitional devices. When combined with bus='virtio': * "virtio-transitional" maps to qemu "virtio-blk-pci-transitional" * "virtio-non-transitional" maps to qemu "virtio-blk-pci-non-transitional" Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
<disk> devices lack the model= attribute which is used by most other device types. bus= mostly acts as one, but it serves other purposes too like determing what target= prefix to use, and for matching against controller type= values. Extending bus= to handle additional virtio transitional devices will complicate apps lives, and it isn't a clean mapping anyways. So let's bite the bullet and add a new <disk model=X/> attribute, and wire up common handling for virtio and virtio-{non-}transitional Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Add a single QEMU_CAPS_VIRTIO_PCI_TRANSITIONAL that will be set if any of the following qemu devices are found: virtio-blk-pci-transitional virtio-blk-pci-non-transitional virtio-net-pci-transitional virtio-net-pci-non-transitional vhost-scsi-pci-transitional vhost-scsi-pci-non-transitional virtio-rng-pci-transitional virtio-rng-pci-non-transitional virtio-9p-pci-transitional virtio-9p-pci-non-transitional virtio-balloon-pci-transitional virtio-balloon-pci-non-transitional vhost-vsock-pci-transitional vhost-vsock-pci-non-transitional virtio-input-host-pci-transitional virtio-input-host-pci-non-transitional virtio-scsi-pci-transitional virtio-scsi-pci-non-transitional virtio-serial-pci-transitional virtio-serial-pci-non-transitional Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
It will be used in future patches Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 04 3月, 2019 21 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1658504 This function is called when a domain is starting up (in qemu driver that is when qemu cmd line is generated). It is used to translate <disk type='volume'/> to something usable by filling in virStorageSource (e.g. fetching disk path, or some connection URI for a network FS). But some of these info are not stored in status XML and thus the function is called on qemuProcessReconnect too to reconstruct runtime data. But this poses a problem because after the first run the mode is set to 'direct', but in the second run this triggers a failure because mode is valid only for 'iscsi' volumes and not 'iscsi-direct' ones. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
Rewrite the code to make usage of some VIR_AUTOFREE logic. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
Now that we're using VIR_AUTOFREE there's quite a bit of clean up possible for now unnecessary goto paths. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
Let's make use of the auto __cleanup capabilities for virObjectUnref consumers. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Let's make use of the auto __cleanup capabilities for VIR_FREE consumers. In some cases adding or removing blank lines for readability. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
In preparation for VIR_AUTOFREE usage, let's remove a couple of unused variables so that clang compilations won't fail. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
Now that we're using VIR_AUTOPTR(virBitmap) there's a couple of methods that we can clean up some now unnecessary goto paths. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
Let's make use of the auto __cleanup capabilities for virBitmapPtr. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
In preparation for using auto free mechanism, change to using the VIR_STEAL_PTR on @def to @ret and of course be sure to properly clean up @def in cleanup. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Use the new helper when moving around the current node of the XPath context. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Quite a few parts modify the XPath context current node to shift the scope and allow easier queries. This also means that the node needs to be restored afterwards. Introduce a macro based on 'VIR_AUTOCLEAN' which adds a local structure on the stack remembering the original node along with a function which will make sure that the node is reset when the local structure leaves scope. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Document that @func must take pointer to @type. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The helper function is used by the VIR_AUTOUNREF macro. Prior art is to clear the pointer even if the variable goes out of scope. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The syntax-check should also check the new ones. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
We'd free only the first element of the vector leaking the rest. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
We don't need it as there's a separate macro for auto-freeing of string lists. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Use of VIR_AUTOPTR and virString is confusing as it's a list and not a single pointer. Replace it by VIR_AUTOSTRINGLIST as string lists are basically the only sane NULL-terminated list we can have. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Similar to VIR_AUTOPTR, VIR_AUTOSTRINGLIST defines a list of strings which will be freed if the pointer is leaving scope. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 John Ferlan 提交于
Let's make use of the auto __cleanup capabilities cleaning up any now unnecessary goto paths. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Daniel Veillard 提交于
* docs/news.xml: updated for release Signed-off-by: NDaniel Veillard <veillard@redhat.com>
-
- 01 3月, 2019 2 次提交
-
-
由 Eric Blake 提交于
Mention my snapshot bug fixes, and the corresponding virsh command-line parse tweak I added while working on the snapshot bug fixes. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
The existing qemu snapshot code has a slight bug: if the domain is currently pmsuspended, you can't use the _REDEFINE flag even though the current domain state should have no bearing on being able to recreate metadata state; and conversely, you can use the _REDEFINE flag to create snapshot metadata claiming to be pmsuspended as a bypass to the normal restrictions that you can't create an original qemu snapshot in that state (the restriction against pmsuspend is specific to qemu, rather than part of the driver-agnostic snapshot_conf code). Fix this by checking the snapshot state (when redefining) instead of the domain state (which is a subset of snapshot states). Fixes the second problem mentioned in https://bugzilla.redhat.com/1680304Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 28 2月, 2019 7 次提交
-
-
由 Jiri Denemark 提交于
Both block_size and nb_block are unit32_t and multiplying them overflows at 4GiB. Moreover, the iscsi_*10_* APIs use 32bit number of blocks and thus they can only address images up to 2TiB with 512B blocks. Let's use 64b iscsi_*16_* APIs instead. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Michal Privoznik 提交于
When fetching LUNs from iscsi server the virISCSIDirectReportLuns() is called. This function does some libiscsi calls and then calls virISCSIDirectRefreshVol() over each LUN found. It's unfortunate that the latter calls virStoragePoolObjClearVols() as we lose all LUNs processed in previous iterations. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Andrea Bolognani 提交于
Some of the recent entries deviated from the established style used throughout the file, so let's fix them. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Michal Privoznik 提交于
Not exhaustive list of new features, improvements and bugfixes. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Michal Privoznik 提交于
Jirka reported a bug that with every 'virsh pool-refresh' an iscsi-direct pool would grow and grow. The problem is that virISCSIDirectRefreshVol() only adds to def->capacity and def->allocation but nothing clears it out to begin with. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Eric Blake 提交于
For consistency with other error messages, and the fact that the object is always called a virDomainSnapshot rather than a mere virSnapshot, include the word "domain" in the error message. Suggested-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Eric Blake 提交于
Commit 28f8dfdc (1.0.0) added a flag to virDomainGetXMLDesc, but failed to document its effects. And considering that the MIGRATABLE flag has been the source of past bugs (CVE-2014-7823, fixed in commit b1674ad5 (1.2.11), or even cf2d4c60 (1.2.13) where flag mismatch broke virsh edit), make the wording wishy-washy enough to discourage using the flag casually, by mentioning that the resulting XML is more for internal use than for validation against the schema. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 27 2月, 2019 1 次提交
-
-
由 Eric Blake 提交于
Due to historical back-compat, bare 'virsh snapshot-create-as' favors internal snapshots (but can't be used on domains with raw storage), while 'virsh snapshot-create-as --disk-only' favors external snapshots. What's more, snapshots created with --disk-only while the domain was running are marked as snapshot state 'disk-snapshot', while snapshots created while the domain was offline are marked as snapshot state 'shutdown' (a 'disk-snapshot' image might not be quiescent, while a 'shutdown' snapshot always is). But this leads to some interesting problems: if we create a --disk-only snapshot of an offline guest, and then immediately try to 'virsh snapshot-create --redefine' using the resulting XML to overwrite the existing snapashot in place, things silently succeed, but 'virsh snapshot-create --redefine --disk-only' fails with an error message that the snapshot state is not 'disk-only'. Worse, if we delete the snapshot metadata first and then try to recreate things, omitting --disk-only fails because the verification code wants to force the default of an internal snapshot (which doesn't work with raw disks), and using --disk-only still fails because the snapshot XML is not 'disk-only' - making it impossible to recreate the snapshot metadata (or to transfer it from one libvirtd host to another). Ideally, the presence or absence of the --disk-only flag, and the presence or absence of an existing snapshot being overwritten, shouldn't matter; if the XML is valid for one situation, it should always be valid to redefine the metadata for that snapshot. Fix things by uniformly using virDomainSnapshotDefIsExternal() (caching the results up front, and eliminating other 'if' clauses now rendered redundant) when deciding whether the XML being requested for redefinition should permit external or force internal state capture (we got it right in only one out of three places in the function). See also https://bugzilla.redhat.com/1680304; this fixes the domain-agnostic problems mentioned there, but another patch is needed to fix further oddities with the qemu driver. I did not check for sure when the problems were introduced (git blame puts some affected hunks as far back as 1.0.0), but it was definitely been broken even before when commit 670e86bf (1.1.4) factored redefine prep out of qemu code into the common snapshot_conf code. Signed-off-by: NEric Blake <eblake@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-