summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-01-13 15:56:06 +0100
committerKevin Wolf <kwolf@redhat.com>2016-01-20 13:36:23 +0100
commit04c01a5c8f006b6e45fa5be8ea857efe7d9c41f9 (patch)
treea564093ac2a06eb941504e037e3c4a19623f6736 /block.c
parent23c88b24721ee907639705bf9de03dcd6b1e66ad (diff)
downloadqemu-04c01a5c8f006b6e45fa5be8ea857efe7d9c41f9.tar.gz
block: Rename BDRV_O_INCOMING to BDRV_O_INACTIVE
Instead of covering only the state of images on the migration destination before the migration is completed, the flag will also cover the state of images on the migration source after completion. This common state implies that the image is technically still open, but no writes will happen and any cached contents will be reloaded from disk if and when the image leaves this state. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/block.c b/block.c
index 6ac3191e08..95b2967192 100644
--- a/block.c
+++ b/block.c
@@ -1191,7 +1191,7 @@ static int bdrv_fill_options(QDict **options, const char *filename,
}
if (runstate_check(RUN_STATE_INMIGRATE)) {
- *flags |= BDRV_O_INCOMING;
+ *flags |= BDRV_O_INACTIVE;
}
return 0;
@@ -3261,10 +3261,10 @@ void bdrv_invalidate_cache(BlockDriverState *bs, Error **errp)
return;
}
- if (!(bs->open_flags & BDRV_O_INCOMING)) {
+ if (!(bs->open_flags & BDRV_O_INACTIVE)) {
return;
}
- bs->open_flags &= ~BDRV_O_INCOMING;
+ bs->open_flags &= ~BDRV_O_INACTIVE;
if (bs->drv->bdrv_invalidate_cache) {
bs->drv->bdrv_invalidate_cache(bs, &local_err);
@@ -3272,14 +3272,14 @@ void bdrv_invalidate_cache(BlockDriverState *bs, Error **errp)
bdrv_invalidate_cache(bs->file->bs, &local_err);
}
if (local_err) {
- bs->open_flags |= BDRV_O_INCOMING;
+ bs->open_flags |= BDRV_O_INACTIVE;
error_propagate(errp, local_err);
return;
}
ret = refresh_total_sectors(bs, bs->total_sectors);
if (ret < 0) {
- bs->open_flags |= BDRV_O_INCOMING;
+ bs->open_flags |= BDRV_O_INACTIVE;
error_setg_errno(errp, -ret, "Could not refresh total sector count");
return;
}