- 04 5月, 2018 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 11 4月, 2018 1 次提交
-
-
由 Wim ten Have 提交于
This patch adds support to qcow2 formatted filesystem object storage by instructing qemu-img to build them with preallocation=falloc whenever the XML described storage <allocation> matches its <capacity>. For all other cases the filesystem stored objects are built with preallocation=metadata. Signed-off-by: NWim ten Have <wim.ten.have@oracle.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 01 2月, 2018 2 次提交
-
-
由 Daniel P. Berrangé 提交于
Now that we can open connections to the secondary drivers on demand, there is no need to pass a virConnectPtr into all the backend functions. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Instead of passing around a virConnectPtr object, just open a connection to the secret driver at time of use. Opening connections on demand will be beneficial when the secret driver is in a separate daemon. It also solves the problem that a number of callers just pass in a NULL connection today which prevents secret lookup working at all. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 30 1月, 2018 1 次提交
-
-
由 Peter Krempa 提交于
Commit 000e9504 tried to fix improper bracketing when refreshing disk volume stats for a backing volume. Unfortunately the condition is still wrong as in cases as the backing store being inaccessible storageBackendUpdateVolTargetInfo returns -2 if instructed to ignore errors. The condition does not take this into account. Dumping XML of a volume which has inacessible backing store would then result into: # virsh vol-dumpxml http.img --pool default error: An error occurred, but the cause is unknown Properly ignore -2 for backing volumes. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1540022
-
- 03 1月, 2018 1 次提交
-
-
由 Julio Faracco 提交于
After commit a693fdba 'vol-dumpxml' missed the ability to show backingStore information. This commit adds a volume type for files that fixes this problem. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1529663Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
-
- 27 10月, 2017 5 次提交
-
-
由 John Ferlan 提交于
Create a shim that will allow other backends to make use of qemu-img functionality to create or possibly modify the volume.
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1490279 Turns out the virStorageBackendVolResizeLocal did not differentiate whether the target volume was a LUKS volume or not and just blindly did the ftruncate() on the target volume. Follow the volume creation logic (in general) and create a qemu-img resize command to resize the target volume for LUKS ensuring that the --object secret is provided as well as the '--image-opts' used by the qemu-img resize logic to describe the path and secret ensuring that it's using the luks driver on the volume of course.
-
由 John Ferlan 提交于
Since all that was really needed was a couple of fields and building the object can be more generic, let's alter the args a bit. This will be useful shortly for adding the secret object for a volume resize operation on a luks volume that will need a secret object.
-
由 John Ferlan 提交于
Rather than inline the various free's and return NULL, just create an error label.
-
由 John Ferlan 提交于
Rather than passing just the path, pass the virStorageVolDefPtr as we're going to need it shortly. Also fix the order of code and stack variables in the calling function virStorageBackendVolResizeLocal.
-
- 17 10月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Add helpers that will simplify checking if a backing file is valid or whether it has backing store. The helper virStorageSourceIsBacking returns true if the given virStorageSource is a valid backing store member. virStorageSourceHasBacking returns true if the virStorageSource has a backing store child. Adding these functions creates a central points for further refactors.
-
- 06 10月, 2017 1 次提交
-
-
由 John Ferlan 提交于
In preparation for privatizing the object, use the accessor. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 05 10月, 2017 1 次提交
-
-
由 Pavel Hrdina 提交于
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1498528Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 27 9月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
We have been trying to implement the ALLOCATE flag to mean "the volume should be fully allocated after the resize". Since commit b0579ed9 we do not allocate from the existing capacity, but from the existing allocation value. However this value is a total of all the allocated bytes, not an offset. For a sparsely allocated file: $ perl -e 'print "x"x8192;' > vol1 $ fallocate -p -o 0 -l 4096 vol1 $ virsh vol-info vol1 default Capacity: 8.00 KiB Allocation: 4.00 KiB Treating allocation as an offset would result in an incompletely allocated file: $ virsh vol-resize vol1 --pool default 16384 --allocate Capacity: 16.00 KiB Allocation: 12.00 KiB Call fallocate from zero on the whole requested capacity to fully allocate the file. After that, the volume is fully allocated after the resize: $ virsh vol-resize vol1 --pool default 16384 --allocate $ virsh vol-info vol1 default Capacity: 16.00 KiB Allocation: 16.00 KiB
-
- 19 9月, 2017 1 次提交
-
-
由 John Ferlan 提交于
Create/use virStoragePoolObjAddVol in order to add volumes onto list. Create/use virStoragePoolObjRemoveVol in order to remove volumes from list. Create/use virStoragePoolObjGetVolumesCount to get count of volumes on list. For the storage driver, the logic alters when the volumes.obj list grows to after we've fetched the volobj. This is an optimization of sorts, but also doesn't "needlessly" grow the volumes.objs list and then just decr the count if the virGetStorageVol fails. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 31 8月, 2017 1 次提交
-
-
由 John Ferlan 提交于
Create a separate function to handle the volume target update via probe processing.
-
- 22 7月, 2017 1 次提交
-
-
由 John Ferlan 提交于
Use the < 0 rather than == -1 (consistently) for virAsprintf errors. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 18 5月, 2017 2 次提交
-
-
由 Michal Privoznik 提交于
These flags to APIs will tell if caller wants to use sparse stream for storage transfer. At the same time, it's safe to enable them in storage driver frontend and rely on our backends checking the flags. This way we can enable specific flags only on some specific backends, e.g. enable VIR_STORAGE_VOL_DOWNLOAD_SPARSE_STREAM for filesystem backend but not iSCSI backend. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
Basically, what is needed here is to introduce new message type for the messages passed between the event loop callbacks and the worker thread that does all the I/O. The idea is that instead of a queue of read buffers we will have a queue where "hole of size X" messages appear. That way the event loop callbacks can just check the head of the queue and see if the worker thread is in data or a hole section and how long the section is. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 26 4月, 2017 2 次提交
-
-
由 John Ferlan 提交于
Create a wrapper/helper that can be used to call the storage backend wipe helper - storageBackendVolWipeLocalFile for future use by logical and disk backends to clear out the partition table rather than having each open code the same algorithm.
-
由 John Ferlan 提交于
Add bool 'zero_end' and logic that would allow a caller to wipe specific portions of a target device either from the beginning (the default) or from the end when zero_end is true. This will allow for this code to wipe out partition table information from a device.
-
- 07 4月, 2017 2 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1439132 Add "bsd" to the list of format types to not checked during blkid processing even though it supposedly knows the format - for some (now unknown) reason it's returning partition table not found. So let's just let PARTED handle "bsd" too. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1439132 Commit id 'a48c674f' added a check for format types "dvh" and "pc98" to use the parted print processing instead of using blkid processing in order to validate the label on the disk was what is expected for disk pool startup. However, commit id 'a4cb4a74' really messed things up by missing an else condition causing PARTEDFindLabel to always return DIFFERENT. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 06 4月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
The contents of volname would be leaked if the function were to be passed an invalid pooltype by the caller. Make sure the memory is released instead.
-
- 04 4月, 2017 5 次提交
-
-
由 Peter Krempa 提交于
For native gluster pools the <dir> field denotes a directory inside the pool. For the actual pool name the <name> field has to be used.
-
由 Peter Krempa 提交于
Use the relative lookup specifier rather than the global one. Otherwise only the first name would be looked up. Add a test case to cover the scenario. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1436574
-
由 Peter Krempa 提交于
To allow testing of the algorithm, split out the extractor into a separate helper.
-
由 Peter Krempa 提交于
The native gluster pool source list data differs from the data used for attaching gluster volumes as netfs pools. Currently the only difference was the format. Since native pools don't use it and later there will be more differences add a more deterministic way to switch between the types instead.
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1371892 The 'capacity' value (e.g. guest logical size) for a LUKS volume is smaller than the 'physical' value of the file in the file system, so we need to account for that. When peeking at the encryption information about the volume add a fetch of the payload_offset which is described as the offset to the start of the volume data (in 512 byte sectors) in QEMU's QCryptoBlockLUKSHeader. Then adjust the ->capacity appropriately when we determine that the volume target encryption has a payload_offset value.
-
- 27 3月, 2017 1 次提交
-
-
由 Martin Kletzander 提交于
There is no reason for it not to be in the utils, all global symbols under that file already have prefix vir* and there is no reason for it to be part of DRIVER_SOURCES because that is just a leftover from older days (pre-driver modules era, I believe). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 16 3月, 2017 1 次提交
-
-
由 John Ferlan 提交于
The function is actually in virutil.c, but prototyped in virfile.h. This patch fixes that by renaming the function to virWaitForDevices, adding the prototype in virutil.h and libvirt_private.syms, and then changing the callers to use the new name. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 07 3月, 2017 1 次提交
-
-
由 Cole Robinson 提交于
$ virsh vol-clone /tmp/test.iso new.iso error: Failed to clone vol from test.iso error: internal error: Child process (/bin/qemu-img convert -f iso -O iso /tmp/test.iso /tmp/new.iso) unexpected exit status 1: qemu-img: Could not open '/tmp/test.iso': Unknown driver 'iso' Map iso->raw before sending the format value to qemu-img https://bugzilla.redhat.com/show_bug.cgi?id=972784 https://bugzilla.redhat.com/show_bug.cgi?id=1419395
-
- 03 3月, 2017 1 次提交
-
-
由 Nehal J Wani 提交于
The build system for libvirt correctly detects the location of blkid using PKG_CONFIG_PATH environment variable. The file blkid.pc states that the include flags should be: 'Cflags: -I${includedir}/blkid' but libvirt searches for blkid.h inside ${includedir}/blkid/blkid, which is wrong. Until now, the compilation for libvirt succeeded because of pure luck, as it had -I/usr/include as a CFLAG. This issue was faced while compiling libvirt on Ubuntu 16.04.2 with bare minimum dev packages and a custom compiled blkid kept in a non-standard $prefix. Signed-off-by: NNehal J Wani <nehaljw.kkd1@gmail.com>
-
- 27 1月, 2017 1 次提交
-
-
由 John Ferlan 提交于
Commit id '5f07c3c0' broke the freebsd build in the libvirt CI test environment because the UMOUNT was not defined unless WITH_STORAGE_FS is defined. So remove the virStorageBackendUmountLocal from storage_util.c,h and restore the code back in the storage_backend_fs.c and _vstorage.c modules.
-
- 26 1月, 2017 2 次提交
-
-
由 John Ferlan 提交于
Move all the volume functions to storage_util to create local/common helpers using the same naming syntax as the existing upload, download, and wipe virStorageBackend*Local API's. In the process of doing so, found more API's that can now become local to storage_util. In order to distinguish between local/external - I changed the names of the now local only ones from "virStorageBackend..." to just "storageBackend..." Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Move some pool functions to storage_util to create local/common helpers using the same naming syntax as the existing upload, download, and wipe virStorageBackend*Local API's. In the process of doing so, found a few API's that can now become local to storage_util. In order to distinguish between local/external - I changed the names of the now local only ones from "virStorageBackend..." to just "storageBackend..." Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 19 1月, 2017 3 次提交
-
-
由 Daniel P. Berrange 提交于
Previous commit tried to change configure logic such that the GLUSTER_CLI parameter would always be set: commit 9e97c8c0 Author: Peter Krempa <pkrempa@redhat.com> Date: Mon Jan 9 15:56:12 2017 +0100 storage: gluster: Remove build-time dependency on the 'gluster' cli tool This missed the fact that the AC_PATH_PROG call was itself inside an 'if' conditional that would not be called in with_storage_gluster was false. As a result, GLUSTER_CLI was still conditionally defined. Just kill the GLUSTER_CLI parameter and AC_PATH_PROG call entirely and pass a bare "gluster" string to virFindFileInPath instead. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Peter Krempa 提交于
The iSCSI backend driver was using stuff from the SCSI driver without making sure that it's compiled in. Move the common code into the storage_util.c since it does not contain any specific code.
-
由 Peter Krempa 提交于
The file became a garbage dump for all kinds of utility functions over time. Move them to a separate file so that the files can become a clean interface for the storage backends.
-