You need to sign in or sign up before continuing.
- 20 4月, 2016 1 次提交
-
-
由 Cole Robinson 提交于
This an ubuntu/debian packaging convention. At one point it may have been an actually different binary, but at least as of ubuntu precise (the oldest supported ubuntu distro, released april 2012) kvm-img is just a symlink to qemu-img for back compat. I think it's safe to drop support for it
-
- 04 2月, 2015 2 次提交
-
-
由 Peter Krempa 提交于
If a storage file would be backed with a NBD device without path (nbd://localhost) libvirt would crash when parsing the backing path for the disk as the URI structure's path element is NULL in such case but the NBD parser would access it shamelessly.
-
由 Peter Krempa 提交于
I'm going to add a few test cases so it's the best time to convert the test to automatic numbering.
-
- 21 11月, 2014 2 次提交
-
-
由 Peter Krempa 提交于
As we now have a common function to parse backing store string for RBD backing store we can reuse it in the backing store walker so that we don't fail on files backed by RBD storage. This patch also adds a few tests to verify that the parsing works as expected.
-
由 Peter Krempa 提交于
To be able to fully test parsing of networked storage strings we need to add a few fields for: hostname, protocol and auth string.
-
- 30 10月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
The code that parses the schema from the URI touches the "hosts[0]" member of the storage file source structure in case the URI contains a schema. The hosts array was not yet allocated at the point in the code where the transport protocol was parsed and set. This lead to a crash of libvirtd. Fix the code by allocating the "hosts" array upfront and add a test case to verify this scenario. (Unfortunately this requires shuffling the test case numbers too). Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1156288
-
- 24 9月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
Add a new parameter to virStorageFileGetMetadata that will break the backing chain detection process and report useful error message rather than having to use virStorageFileChainGetBroken. This patch just introduces the option, usage will be provided separately.
-
- 09 7月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
Instead of just returning the parent path, return the complete parent source structure.
-
- 25 6月, 2014 9 次提交
-
-
由 Peter Krempa 提交于
The parent directory doesn't necessarily need to be stored after we don't mangle the path stored in the image. Remove it and tweak the code to avoid using it.
-
由 Peter Krempa 提交于
Store backing chain paths as non-canonical. The canonicalization step will be already taken. This will allow to avoid storing unnecessary amounts of data.
-
由 Peter Krempa 提交于
After we don't test relative paths, remove even more unnecessary cruft from the test code.
-
由 Peter Krempa 提交于
libvirt always uses an absolute path to address the top image of an image chain. Our storage test tests also the relative path which won't ever be used. Additionally it makes the test more complicated.
-
由 Peter Krempa 提交于
Now that we store only relative names in virStorageSource's member relPath the backingRelative member is obsolete. Remove it and adapt the code to the removal.
-
由 Peter Krempa 提交于
Separately remove the now unused variable.
-
由 Peter Krempa 提交于
Due to various refactors and compatibility with the virstoragetest the relPath field of the virStorageSource structure was always filled either with the relative name or the full path in case of absolutely backed storage. Return its original purpose to store only the relative name of the disk if it is backed relatively and tweak the tests.
-
由 Peter Krempa 提交于
Now that we changed ordering of the stored metadata so that the backing store is described by the child element the test should reflect this change too. Remove the expected backing store field as it's actually described by the next element in the backing chain, so there's no need for duplication.
-
由 Peter Krempa 提交于
This patch introduces a function that will allow us to resolve a relative difference between two elements of a disk backing chain. This function will be used to allow relative block commit and block pull where we need to specify the new relative name of the image to qemu. This patch also adds unit tests for the function to verify that it works correctly.
-
- 24 6月, 2014 2 次提交
-
-
由 Peter Krempa 提交于
Introduce a common function that will take a callback to resolve links that will be used to canonicalize paths on various storage systems and add extensive tests.
- 16 6月, 2014 4 次提交
-
-
由 Eric Blake 提交于
The block commit code looks for an explicit base file relative to the discovered top file; so for a chain of: base <- snap1 <- snap2 <- snap3 and a command of: virsh blockcommit $dom vda --base snap2 --top snap1 we got a sane message (here from libvirt 1.0.5): error: invalid argument: could not find base 'snap2' below 'snap1' in chain for 'vda' Meanwhile, recent refactoring has slightly reduced the quality of the libvirt error messages, by losing the phrase 'below xyz': error: invalid argument: could not find image 'snap2' in chain for 'snap3' But we had a one-off, where we were not excluding the top file itself in searching for the base; thankfully qemu still reports the error, but the quality is worse: virsh blockcommit $dom vda --base snap2 --top snap2 error: internal error unable to execute QEMU command 'block-commit': Base '/snap2' not found Fix the one-off in blockcommit by changing the semantics of name lookup - if a starting point is specified, then the result must be below that point, rather than including that point. The only other call to chain lookup was blockpull code, which was already forcing the lookup to omit the active layer and only needs a tweak to use the new semantics. This also fixes the bug exposed in the testsuite, where when doing a lookup pinned to an intermediate point in the chain, we were unable to return the name of the parent also in the chain. * src/util/virstoragefile.c (virStorageFileChainLookup): Change semantics for non-NULL startFrom. * src/qemu/qemu_driver.c (qemuDomainBlockJobImpl): Adjust caller, to keep existing semantics. * tests/virstoragetest.c (mymain): Adjust to expose new semantics. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Add some more tests of what happens when we restrict a lookup to begin at a point in the middle of a chain. In particular, we want to ensure that a parent is not found when starting at the child. This commit also demonstrates that we have a slight difference in behavior on what parent we report when filtering is in effect; as the determination of the parent affects the code in block commit, exposing this in the testsuite will help justify changes in future patches that tweak the semantics of what lookups are allowed. * tests/virstoragetest.c (testStorageLookup): Test user input. (TEST_LOOKUP_TARGET): Add parameter. (mymain): Add lookup tests. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
The next patch will be adding tests, including adding a parameter for testing more conditions. For ease of review of that patch, I want to create common context lines that don't change when the new tests are added (it's easier to visually review additions than it is to review an entire chunk of tests rewritten into another larger chunk of tests). * tests/virstoragetest.c (mymain): Add a parameter and renumber the lookup tests. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Typing chain->backingStore->backingStore gets old after a while; introduce some alias variables to make the test more compact. * tests/virstoragetest.c (mymain): Introduce some shorthand. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 13 6月, 2014 1 次提交
-
-
由 Peter Krempa 提交于
When the test is failing but the debug output isn't enabled the resulting line would look ugly like and would not contain the actual difference. TEST: virstoragetest .................chain member 1!chain member 1!chain member 1! Store the member index in the actual checked string to hide this problem
-
- 03 6月, 2014 4 次提交
-
-
由 Peter Krempa 提交于
All the fields crammed into two lines weren't easy to parse by human eyes. Split up the format string into lines and put it into a central variable so that changes in two places aren't necessary.
-
由 Peter Krempa 提交于
Use the new backing store parser in the backing chain crawler. This change needs one test change where information about the NBD image are now parsed differently.
-
由 Peter Krempa 提交于
Stat the path of the storage file being tested to set the correct type into the virStorageSource. This will avoid breaking the test suite when inquiring metadata of directory paths in the next patches.
-
由 Peter Krempa 提交于
My future work will modify the metadata crawler function to use the storage driver file APIs to access the files instead of accessing them directly so that we will be able to request the metadata for remote files too. To avoid linking the storage driver to every helper file using the utils code, the backing chain traversal function needs to be moved to the storage driver source. Additionally the virt-aa-helper and virstoragetest programs need to be linked with the storage driver as a result of this change.
-
- 06 5月, 2014 1 次提交
-
-
由 Julio Faracco 提交于
In "src/util/" there are many enumeration (enum) declarations. Sometimes, it's better using a typedef for variable types, function types and other usages. Other enumeration will be changed to typedef's in the future. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 25 4月, 2014 2 次提交
-
-
由 Jiri Denemark 提交于
Each backing store of a given disk is associated with a unique index (which is also formatted in domain XML) for easier addressing of any particular backing store. With this patch, any backing store can be addressed by its disk target and the index. For example, "vdc[4]" addresses the backing store with index equal to 4 of the disk identified by "vdc" target. Such shorthand can be used in any API in place for a backing file path: virsh blockcommit domain vda --base vda[3] --top vda[2] Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Returning both virStorageSourcePtr and its path member does not make a lot of sense. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 24 4月, 2014 7 次提交
-
-
由 Peter Krempa 提交于
To avoid having the root of a backing chain present twice in the list we need to invert the working of virStorageFileGetMetadataRecurse. Until now the recursive worker created a new backing chain element from the name and other information passed as arguments. This required us to pass the data of the parent in a deconstructed way and the worker created a new entry for the parent. This patch converts this function so that it just fills in metadata about the parent and creates a backing chain element from those. This removes the duplication of the first element. To avoid breaking the test suite, virstoragetest now calls a wrapper that creates the parent structure explicitly and pre-fills it with the test data with same function signature as previously used.
-
由 Peter Krempa 提交于
Don't remove detected metadata about directory based storage volumes.
-
由 Peter Krempa 提交于
To conform with the naming of the planned XML output rename the metadata variable name. s/backingMeta/backingStore/g
-
由 Peter Krempa 提交于
Replace the old structure with the new one. This change is a trivial name change operation (along with change of the freeing function).
-
由 Peter Krempa 提交于
Remove the obsolete field replaced by data in "path". The testsuite requires tweaking as the name of the backing file is now stored one layer deeper in the backing chain linked list.
-
由 Peter Krempa 提交于
As for the previous patch, this change is needed to achieve compatibility with all the existing code, where we expect a fully qualified path of local files to be present.
-
由 Peter Krempa 提交于
To allow future change of virStorageFileMetadata to virStorageSource we need to store a full path in the "path" variable as rest of the code expects it to be a full path. Rename the "path" field to "relPath" to keep tracking the info but allowing a real "path" field.
-
- 12 4月, 2014 2 次提交
-
-
由 Eric Blake 提交于
Another field no longer needed, getting us one step closer to merging virStorageFileMetadata and virStorageSource. * src/util/virstoragefile.h (_virStorageFileMetadata): Drop field. * src/util/virstoragefile.c (virStorageFileGetMetadataInternal) (virStorageFileGetMetadataFromFDInternal): Alter signature. (virStorageFileFreeMetadata, virStorageFileGetMetadataFromBuf) (virStorageFileGetMetadataFromFD): Adjust clients. * tests/virstoragetest.c (_testFileData, testStorageChain) (mymain): Simplify test. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Thanks to the testsuite, I feel quite confident that this rewrite is correct; it gives the same results for all cases except for one. I can make the argument that _that_ case was a pre-existing bug: when looking up relative names, the lookup is supposed to be pegged to the directory that contains the parent qcow2 file. Thus, this resolves the fixme first mentioned in commit 367cd69d (even though I accidentally removed the fixme comment early in 74430fe3). * src/util/virstoragefile.c (virStorageFileChainLookup): Depend on new rather than old fields. * tests/virstoragetest.c (mymain): Adjust test to match fix. Signed-off-by: NEric Blake <eblake@redhat.com>
-