- 27 9月, 2017 3 次提交
-
-
由 Ján Tomko 提交于
Calling fallocate on the new (smaller) capacity ensures that the whole file is allocated, but it does not reduce the file size. Also call ftruncate after fallocate. https://bugzilla.redhat.com/show_bug.cgi?id=1366446
-
由 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
-
由 Ján Tomko 提交于
Introduce a new function virFileAllocate that will call the non-destructive variants of safezero, essentially reverting my commit 1390c268 safezero: fall back to writing zeroes even when resizing back to the state as of commit 18f03166 virstoragefile: Have virStorageFileResize use safezero This means that _ALLOCATE flag will no longer work on platforms without the allocate syscalls, but it will not overwrite data either.
-
- 22 9月, 2017 1 次提交
-
-
由 John Ferlan 提交于
Commit id '5604c056' used the wrong API to generate the <secret type='%s'..." field. The previous code used the correct API as was done in commit id '6887af39'. The data is actually a usage type not an auth type even though the result is the same.
-
- 20 9月, 2017 2 次提交
-
-
由 Ashish Mittal 提交于
Add the backing parse and a test case to verify parsing of VxHS backing storage. Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com> Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Ashish Mittal 提交于
Add a new virStorageNetProtocol for Veritas HyperScale (VxHS) disks Signed-off-by: NAshish Mittal <Ashish.Mittal@veritas.com> Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 12 9月, 2017 1 次提交
-
-
由 Guido Günther 提交于
-
- 27 7月, 2017 1 次提交
-
-
由 Peter Krempa 提交于
Make it less confusing by naming the field which refers to the storage object as 'nodestorage'. Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 24 7月, 2017 2 次提交
-
-
由 Peter Krempa 提交于
Currently, @port is type of string. Well, that's overkill and waste of memory. Port is always an integer. Use it as such. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Similarly to when parsing XML we need to fill in default ports for the backing chain. This was missed in commit 5bda8354
-
- 14 7月, 2017 3 次提交
-
-
由 Peter Krempa 提交于
Fill them in right away rather than having to figure out at runtime whether they are necessary or not. virStorageSourceNetworkDefaultPort does not need to be exported any more.
-
由 Peter Krempa 提交于
Our documentation provides them, so the helper should return them.
-
由 Peter Krempa 提交于
Make the stuff hardcoded in qemu a global helper so that other parts of the code can determine the default port too.
-
- 11 7月, 2017 3 次提交
-
-
由 Peter Krempa 提交于
Now that the JSON deflattener is working sanely we can always attempt the deflattening so that we can then parse the tree as expected.
-
由 Peter Krempa 提交于
Currently the function would deflatten the object by dropping the 'file' prefix from the attributes. This does not really scale well or adhere to the documentation. Until we refactor the worker to properly deflatten everything we at least simulate it by adding the "file" wrapper object back.
-
由 Peter Krempa 提交于
The code will become more universal so it makes more sense for it to live with the rest of the JSON functions.
-
- 24 6月, 2017 1 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1371892 As it turns out the volume create, build, and refresh path was not peeking at the meta data, so immediately after a create operation the value displayed for capacity was still incorrect. However, if a pool refresh was done the correct value was fetched as a result of a meta data peek. The reason is it seems historically if the file type is RAW then peeking at the file just took the physical value for the capacity. However, since we know if it's an encrypted file, then peeking at the meta data will be required in order to get a true capacity value. So check for encryption in the source and if present, use the meta data in order to fill in the capacity value and set the payload_offset.
-
- 20 6月, 2017 10 次提交
-
-
由 Peter Krempa 提交于
Some callers don't need to know the backing format. Make the argument optional by using a dummy int if NULL is passed.
-
由 Peter Krempa 提交于
-
由 Peter Krempa 提交于
Since qemu 2.9 the options changed from a monolithic string into fine grained options for the json pseudo-protocol object.
-
由 Peter Krempa 提交于
Since qemu 2.9 the options changed from a monolithic string into fine grained options for the json pseudo-protocol object.
-
由 Peter Krempa 提交于
Since qemu 2.9 the options changed from a monolithic string into fine grained options for the json pseudo-protocol object.
-
由 Peter Krempa 提交于
Since 2.9 the host and port for NBD are no longer directly under the json pseudo-protocol object, but rather belong to a sub-object called 'server'.
-
由 Peter Krempa 提交于
Starting from qemu 2.9, more granular options are supported. Add parser for the relevant bits. With this patch libvirt is able to parse the host and target IQN of from the JSON pseudo-protocol specification. This corresponds to BlockdevOptionsIscsi in qemu qapi.
-
由 Peter Krempa 提交于
Merge the reporting of the missing source host data into the parser functions so that callers don't have to do it separately.
-
由 Peter Krempa 提交于
Few backing protocols support only TCP. Split out the function which will correspond to parsing qemu's InetSocketAddressBase.
-
由 Peter Krempa 提交于
'SocketAddress' structure was changed to contain 'inet' instead of 'tcp' since qemu commit c5f1ae3ae7b. Existing entries have a backward compatibility layer. Libvirt will parse 'inet' and 'tcp' as equivalents.
-
- 19 6月, 2017 3 次提交
-
-
由 Peter Krempa 提交于
The same json strucutre is used for NBD and sheepdog volumes for specifying of the host. Rename the function and fix up error messages to be more universal.
-
由 Peter Krempa 提交于
If the number of servers is not expected the code would report an error but would not return failure.
-
由 Peter Krempa 提交于
-
- 02 6月, 2017 2 次提交
-
-
由 Julio Faracco 提交于
The host address or the socket path have already been checked at the begining of the function virStorageSourceParseNBDColonString(). So, when the parameter is not a unix socket, there is no reason to check the address again because if it does not exists, the logic will fail in the first IF conditional. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
-
由 Julio Faracco 提交于
VIR_STRDUP returns -1 if the string copy was not successful. So, the current comparison/logic is throwing an error when VIR_STRDUP() returns 1. Only when source is NULL, it is considering as a success which is not right. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
-
- 15 5月, 2017 1 次提交
-
-
由 Daniel P. Berrange 提交于
The metadata libvirt cares about is identical for version 3 as for previous versions, so we merely need list the new version number. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 05 4月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
Imagine that this function is called twice over the same disk source. While in the first run all allocated memory is freed, not all pointers are set to NULL (e.g. def->srcpool). So when called again, these poitners are freed again resulting in double free. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 04 4月, 2017 1 次提交
-
-
由 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 4 次提交
-
-
由 Eric Blake 提交于
We keep forgetting that older setups don't like 'index': CC util/libvirt_util_la-virsysinfo.lo cc1: warnings being treated as errors util/virstoragefile.c: In function 'virStorageSourceFindByNodeName': util/virstoragefile.c:3804: error: declaration of 'index' shadows a global declaration [-Wshadow] /usr/include/string.h:489: error: shadowed declaration is here [-Wshadow] Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Martin Kletzander 提交于
STREQ_NULLABLE returns true if both parameters are NULL. And that's not what we want here. We just want to skop comparing source nodes that don't have that info set. The function wouldn't make much sense with nodeName == NULL, so we don't need to check that. Moreover, the function's declaration uses ATTRIBUDE_NONNULL for nodeName, which not only means that function expects the parameter not to be NULL, but actually tells the compiler that it can optimize out the NULL checks. That way it could end up calling strcmp on NULL (either nodeformat or nodebacking). GCC figures this out if libvirt is compiled with lv_cv_static_analysis=yes, unfortunately not everyone uses that. Caused by cbc6d535. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Peter Krempa 提交于
'nodeformat' should be used for strings which describe the storage format object, and 'nodebacking' for the actual storage object itself.
-
由 Peter Krempa 提交于
The function has very specific semantics. Split out the part that parses the backing store specification string into a separate helper so that it can be reused later while keeping the wrapper with existing semantics. Note that virStorageFileParseChainIndex is pretty well covered by the test suite.
-
- 22 2月, 2017 1 次提交
-
-
由 Tomáš Golembiovský 提交于
The 'raw' block driver in Qemu is not directly interesting from libvirt's perspective, but it can be layered above some other block drivers and this may be interesting for the user. The patch adds support for the 'raw' block driver. The driver is treated simply as a pass-through and child driver in JSON is queried to get the necessary information. Signed-off-by: NTomáš Golembiovský <tgolembi@redhat.com>
-