diff options
author | Fam Zheng <famz@redhat.com> | 2014-09-11 13:14:00 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2015-01-13 13:43:29 +0000 |
commit | bb00021de0b5908bc2c3ca467ad9a2b0c9c36459 (patch) | |
tree | 87cc009a3e868b3bd2dac421dcdfb8bf6043cbda /include/block | |
parent | 095e4fa4b56cf511cb41005872eeace9a2f24582 (diff) | |
download | qemu-bb00021de0b5908bc2c3ca467ad9a2b0c9c36459.tar.gz qemu-bb00021de0b5908bc2c3ca467ad9a2b0c9c36459.tar.bz2 qemu-bb00021de0b5908bc2c3ca467ad9a2b0c9c36459.zip |
block: Split BLOCK_OP_TYPE_COMMIT to BLOCK_OP_TYPE_COMMIT_{SOURCE, TARGET}
Like BLOCK_OP_TYPE_BACKUP_SOURCE and BLOCK_OP_TYPE_BACKUP_TARGET,
block-commit involves two asymmetric devices.
This change is not user-visible (yet), because commit only works with
device names.
But once we enable backing reference in blockdev-add, or specifying
node-name in block-commit command, we don't want the user to start two
commit jobs on the same backing chain, which will corrupt things because
of the final bdrv_swap.
Before we have per category blockers, splitting this type is still
better.
[Resolved virtio-blk dataplane conflict by replacing
BLOCK_OP_TYPE_COMMIT with both BLOCK_OP_TYPE_COMMIT_{SOURCE, TARGET}.
They are safe since the block job runs in the same AioContext as the
dataplane IOThread.
--Stefan]
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/block.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h index 760e78b71d..3082d2b80e 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -133,7 +133,8 @@ typedef enum BlockOpType { BLOCK_OP_TYPE_BACKUP_SOURCE, BLOCK_OP_TYPE_BACKUP_TARGET, BLOCK_OP_TYPE_CHANGE, - BLOCK_OP_TYPE_COMMIT, + BLOCK_OP_TYPE_COMMIT_SOURCE, + BLOCK_OP_TYPE_COMMIT_TARGET, BLOCK_OP_TYPE_DATAPLANE, BLOCK_OP_TYPE_DRIVE_DEL, BLOCK_OP_TYPE_EJECT, |