]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virStorageSourceIsSameLocation: Special-case storage sources of type 'volume'
authorPeter Krempa <pkrempa@redhat.com>
Fri, 26 Nov 2021 12:21:47 +0000 (13:21 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 1 Dec 2021 12:39:48 +0000 (13:39 +0100)
commitf654464f7ab86ac756e7c38e6598389c9605dc08
tree61f5a8a4f7267141fb2705de91e5208c60bfd05d
parentc0b40323f8697353bf918a142bb50ca3c4e398ac
virStorageSourceIsSameLocation: Special-case storage sources of type 'volume'

The function is used also to compare virStorageSource which may not be
resolved to the image at that point in which case the 'path' is not yet
populated and the actual type is not yet set. This means that the
function fails to consider two identical volume-based disks as pointing
to the same thing.

Add a special case for both images being type=volume in which case we
compare only the pool/volume names.

Closes: https://gitlab.com/libvirt/libvirt/-/issues/240
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
src/conf/storage_source_conf.c