]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Don't error out if allocation info can't be queried
authorPeter Krempa <pkrempa@redhat.com>
Mon, 22 May 2017 15:44:00 +0000 (17:44 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 2 Jun 2017 07:40:54 +0000 (09:40 +0200)
qemuDomainGetBlockInfo would error out if qemu did not report
'wr_highest_offset'. This usually does not happen, but can happen
briefly during active layer block commit. There's no need to report the
error, we can simply report that the disk is fully alocated at that
point.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1452045

src/qemu/qemu_driver.c

index fcab7ddf82edd2bb5f3e0cb1123fa7140e3deffb..14bc6708ae67e68d3cda46338bea51d2d9718311 100644 (file)
@@ -11553,14 +11553,6 @@ qemuDomainGetBlockInfo(virDomainPtr dom,
     }
 
     if (!entry->wr_highest_offset_valid) {
-        if (virStorageSourceGetActualType(disk->src) == VIR_STORAGE_TYPE_BLOCK &&
-            disk->src->format != VIR_STORAGE_FILE_RAW) {
-            virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("failed to query the maximum written offset of "
-                             "block device '%s'"), disk->dst);
-            goto endjob;
-        }
-
         info->allocation = entry->physical;
     } else {
         if (virStorageSourceGetActualType(disk->src) == VIR_STORAGE_TYPE_FILE &&