]> git.proxmox.com Git - qemu.git/blobdiff - block/stream.c
block: expect errors from bdrv_co_is_allocated
[qemu.git] / block / stream.c
index 7fe9e486bf3f9c6b2b2c08669dd23b4c29709206..4e8d177fdc1b0e0278d8327a1c553991ce308a12 100644 (file)
@@ -120,7 +120,7 @@ wait:
         if (ret == 1) {
             /* Allocated in the top, no need to copy.  */
             copy = false;
-        } else {
+        } else if (ret >= 0) {
             /* Copy if allocated in the intermediate images.  Limit to the
              * known-unallocated area [sector_num, sector_num+n).  */
             ret = bdrv_co_is_allocated_above(bs->backing_hd, base,