]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
migration: Document handling of bdrv_is_allocated() errors
authorEric Blake <eblake@redhat.com>
Wed, 8 Mar 2017 21:34:29 +0000 (15:34 -0600)
committerKevin Wolf <kwolf@redhat.com>
Mon, 13 Mar 2017 11:49:33 +0000 (12:49 +0100)
Migration is the only code left in the tree that does not react
to bdrv_is_allocated() failures.  But as there is no useful way
to react to the failure, and we are merely skipping unallocated
sectors on success, just document that our choice of handling
is intended.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
migration/block.c

index 1941bc2402bdb17e5136cafe82003c520a9cfa2f..67412282003500c45c5e74d38ee23e6041035203 100644 (file)
@@ -276,6 +276,8 @@ static int mig_save_device_bulk(QEMUFile *f, BlkMigDevState *bmds)
     if (bmds->shared_base) {
         qemu_mutex_lock_iothread();
         aio_context_acquire(blk_get_aio_context(bb));
+        /* Skip unallocated sectors; intentionally treats failure as
+         * an allocated sector */
         while (cur_sector < total_sectors &&
                !bdrv_is_allocated(blk_bs(bb), cur_sector,
                                   MAX_IS_ALLOCATED_SEARCH, &nr_sectors)) {