summaryrefslogtreecommitdiffstats
path: root/block/io.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-01-13 15:56:06 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:25 -0600
commit51c6adda82f65fef0d81799743035e5dc17c82e2 (patch)
treeb20f985755629e96114f968ebe700802306d7f3a /block/io.c
parent73d97b9ada782c0c462c9b8952f744a3decc20c0 (diff)
downloadhqemu-51c6adda82f65fef0d81799743035e5dc17c82e2.zip
hqemu-51c6adda82f65fef0d81799743035e5dc17c82e2.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/io.c')
-rw-r--r--block/io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/io.c b/block/io.c
index 2372994..5bb353a 100644
--- a/block/io.c
+++ b/block/io.c
@@ -1301,7 +1301,7 @@ static int coroutine_fn bdrv_co_do_pwritev(BlockDriverState *bs,
if (bs->read_only) {
return -EPERM;
}
- assert(!(bs->open_flags & BDRV_O_INCOMING));
+ assert(!(bs->open_flags & BDRV_O_INACTIVE));
ret = bdrv_check_byte_request(bs, offset, bytes);
if (ret < 0) {
@@ -2463,7 +2463,7 @@ int coroutine_fn bdrv_co_discard(BlockDriverState *bs, int64_t sector_num,
} else if (bs->read_only) {
return -EPERM;
}
- assert(!(bs->open_flags & BDRV_O_INCOMING));
+ assert(!(bs->open_flags & BDRV_O_INACTIVE));
/* Do nothing if disabled. */
if (!(bs->open_flags & BDRV_O_UNMAP)) {
OpenPOWER on IntegriCloud