- 12 11月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
-
- 21 10月, 2019 3 次提交
-
-
由 Peter Krempa 提交于
Calling the monitor was convenient for the implementation in qemuDomainBlockCopyCommon, but causes the snapshot code to call query-named-block-nodes for every disk. Fix this by removing the monitor call from qemuBlockStorageSourceCreateDetectSize so that the data can be reused in loops. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Ján Tomko 提交于
Replace all occurrences of if (VIR_STRDUP(a, b) < 0) /* effectively dead code */ with: a = g_strdup(b); Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Replace all the occurrences of ignore_value(VIR_STRDUP(a, b)); with a = g_strdup(b); Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 10月, 2019 5 次提交
-
-
由 Ján Tomko 提交于
Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Prefer: return g_steal_pointer(&ptr); Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Since commit 44e7f029 util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOPTR aliases to g_autoptr. Replace all of its use by the GLib macro version. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Since commit 44e7f029 util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOPTR aliases to g_autoptr. Replace all uses of VIR_DEFINE_AUTOPTR_FUNC with G_DEFINE_AUTOPTR_CLEANUP_FUNC in preparation for replacing the rest. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Ján Tomko 提交于
Since commit 44e7f029 util: rewrite auto cleanup macros to use glib's equivalent VIR_AUTOFREE is just an alias for g_autofree. Use the GLib macros directly instead of our custom aliases. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 15 10月, 2019 1 次提交
-
-
由 Ján Tomko 提交于
Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 30 9月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
Use the new generator residing in the monitor code rather than directly using qemuMonitorJSONTransactionAdd. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 06 9月, 2019 3 次提交
-
-
由 Peter Krempa 提交于
Pass backing store as an argument rather than extracting it locally and fix the callers. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Pass in backing store explicitly to qemuBlockStorageSourceGetBlockdevProps and fix the callers. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Move all bits of the formatting of the 'backing' attribute to a single condition and make it use a single extracted copy of the backing store. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 04 9月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
The 'u' modifier creates an unsigned int JSON attribute but the disk size and capacity fields are unsigned long long. If the size of the created image would be more than 4GiB we'd overflow and create sub-4G image. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 16 8月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
QEMU finally exposes an interface which allows us to instruct it to format or create arbitrary images. This is required for blockdev integration of block copy and snapshots as we need to pre-format images prior to use with blockdev-add. This path introduces job handling and also helpers for formatting and attaching a whole image described by a virStorageSource. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 25 7月, 2019 2 次提交
-
-
由 Peter Krempa 提交于
In case when the backing store can be represented with something simpler such as a URI we can use it rather than falling back to the json: pseudo-protocol. In cases when it's not worth it (e.g. with the old ugly NBD or RBD strings) let's switch to json. The function is exported as we'll need it when overwriting the ugly strings qemu would come up with during blockjobs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
For the modern use cases we are going to use 'blockdev-snapshot' instead of 'blockdev-snapshot-sync'. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 18 7月, 2019 5 次提交
-
-
由 Peter Krempa 提交于
QEMU allows us to create storage on certain network protocols which allow image creation through their API. Wire up the generator for using it with libvirt as well as for local files. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
'blockdev-add' allows us to use qemu to format images to our desired format. This patch implements helpers which convert a virStorageSourcePtr into JSON objects describing the required configuration. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
To allow using -blockdev with blockjobs QEMU needs to reopen files in read-write mode when modifying the backing chain. To achieve this we need to use 'auto-read-only' for the backing files rather than the normal 'read-only' property. That way qemu knows that the files need to be reopened. Note that the format drivers (e.g. qcow2) are still opened with the read-only property enabled when being a member of the backing chain since they are supposed to be immutable unless a block job is started. QEMU v4.0 (since commit 23dece19da4) allows also dynamic behaviour for auto-read-only which allows us to use sVirt as we only grant write permissions to files when doing a blockjob. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
To allow reusing the formatters in the code for creating JSON properties for 'blockdev-create' we need to create everything except the 'driver' attribute. Use the new helper virJSONValueObjectPrependString to put the driver at the same place so that we don't change any output. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
When formatting new qcow2 images we need to provide the backing store string which should not contain any authentication or irrelevant data. Add a flag for qemuBlockStorageSourceGetBackendProps which allows to skip the irrelevant data. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 15 7月, 2019 1 次提交
-
-
由 Peter Krempa 提交于
Split up the addition of a storage source into the following sub-steps: 1) storage access dependencies (TLS transport, persistent reservation) 2) storage acccess node (file/gluster/nbd...) 3) format driver dependencies (encryption secret) 4) format driver node (qcow2, raw, ...) The functions split out will be later reused when implementing support for 'blockdev-create' as we'll need the dependencies plugged in first, then blockdev-create will be called and after that successfully finishes blockdev-add will be added. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 26 6月, 2019 2 次提交
-
-
由 Peter Krempa 提交于
These are meant to replace the ad-hoc helpers qemuHotplugDiskSourceAttach... and the open-coded version in qemu_command.c for use in command line generation. The functions for preparing for attach of chains unfortunately need to be in qemu_command.c as they use function defined by that file and inclusion hierarchy. In this patch new functions are introduced and subsequent patches then refactor individual parts to use them. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Move it to qemu_block.c and call it qemuBlockStorageSourceDetachPrepare. It will be reused in other parts as well. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 10 4月, 2019 8 次提交
-
-
由 Peter Krempa 提交于
Demonstrate how VIR_RETURN_PTR is used by refactoring qemu_block.c Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
This is a locally used helper struct but we can make use of automatic freeing for it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 05 12月, 2018 1 次提交
-
-
由 Yuri Chornoivan 提交于
Signed-off-by: NYuri Chornoivan <yurchor@ukr.net> Reviewed-by: NJán Tomko <jtomko@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 21 8月, 2018 2 次提交
-
-
由 Peter Krempa 提交于
The copy on read functionality is done using a separate layer in the backing chain. Add function to generate properties for it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Turns out that 'query-nodes' is not what we want and the 'query-blockstats' command was in fact buggy. Revert the new field since it's not needed. This reverts commit 50edca13. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 08 8月, 2018 1 次提交
-
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 20 7月, 2018 2 次提交
-
-
由 Peter Krempa 提交于
The 'query-blockstats' command does not return statistics for the explicitly named nodes unless the new argument is specified. Add infrastrucuture that will allow us to use the new approach if desired. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
With 'transaction' support we don't need to keep around the multipurpose code which would create the snapshot if 'transaction' is not supported. To simplify this add a new helper that just wraps the arguments for 'blockdev-snapshot-sync' operation in 'transaction' and use it instead of qemuBlockSnapshotAddLegacy. Additionally this allows to format the arguments prior to creating the file for simpler cleanup. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-