]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: util: Properly ignore errors when backing volume is inaccessible
authorPeter Krempa <pkrempa@redhat.com>
Tue, 30 Jan 2018 10:41:59 +0000 (11:41 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 30 Jan 2018 10:41:59 +0000 (11:41 +0100)
commitb2c5f28a72465bf047311828c8c66112c8ca84e5
tree9d827c11c92ba12e01b85f05bec6078c7099ffb8
parentf2e16994f7d660a54daba1059441dc0dcf4d9cbd
storage: util: Properly ignore errors when backing volume is inaccessible

Commit 000e9504559 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
src/storage/storage_util.c