]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Don't mangle the storage format for type='dir'
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 25 Aug 2017 12:45:56 +0000 (14:45 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 29 Aug 2017 14:30:04 +0000 (16:30 +0200)
commit3401e208ab1dcea4694e5b18623d9b91d4bc286f
treed4abff2b153dfa1ab348eef6f9167e4349e33aa6
parent912bc7204fbda3f280c25ee142241d7666aaae6f
qemu: Don't mangle the storage format for type='dir'

Our backing probing code handles directory file types properly in
virStorageFileGetMetadataRecurse(), by that I mean it leaves them
alone.  However its caller, the virStorageFileGetMetadata() resets the
type to raw before probing, without even checking the type.  We need
to special-case TYPE_DIR in order to achieve desired results.

Also, in order to properly test this, we need to stop resetting format
of volumes in tests for TYPE_DIR (probably the reason why we didn't
catch that and why the test data didn't need to be modified).

Partially-resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1443434

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/storage/storage_source.c
tests/virstoragetest.c