diff options
author | Eric Blake <eblake@redhat.com> | 2017-03-08 15:34:29 -0600 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2017-03-13 12:49:33 +0100 |
commit | 7d66b1fbd2112a0c1433ad7106d74c7c39e57f5f (patch) | |
tree | 1dec0bf7c29b327a9109adc2611274fa9fd268b9 /migration/block.c | |
parent | 6f712ee08036f4e8066cdddcfed288bf01914e55 (diff) |
migration: Document handling of bdrv_is_allocated() errors
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>
Diffstat (limited to 'migration/block.c')
-rw-r--r-- | migration/block.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/block.c b/migration/block.c index 1941bc2402..6741228200 100644 --- a/migration/block.c +++ b/migration/block.c @@ -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)) { |