[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 23/23] block/replication: Clarify 'top-id' parameter
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 23/23] block/replication: Clarify 'top-id' parameter usage |
Date: |
Mon, 24 Oct 2016 19:02:11 +0200 |
From: Changlong Xie <address@hidden>
The replication driver only supports the 'top-id' parameter for the
secondary side; it must not be supplied for the primary side.
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Changlong Xie <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
block/replication.c | 5 +++++
qapi/block-core.json | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/block/replication.c b/block/replication.c
index 3bd1cf1..8bbfc8f 100644
--- a/block/replication.c
+++ b/block/replication.c
@@ -101,6 +101,11 @@ static int replication_open(BlockDriverState *bs, QDict
*options,
if (!strcmp(mode, "primary")) {
s->mode = REPLICATION_MODE_PRIMARY;
+ top_id = qemu_opt_get(opts, REPLICATION_TOP_ID);
+ if (top_id) {
+ error_setg(&local_err, "The primary side does not support option
top-id");
+ goto fail;
+ }
} else if (!strcmp(mode, "secondary")) {
s->mode = REPLICATION_MODE_SECONDARY;
top_id = qemu_opt_get(opts, REPLICATION_TOP_ID);
diff --git a/qapi/block-core.json b/qapi/block-core.json
index c59047b..97b1205 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -2197,7 +2197,8 @@
# @mode: the replication mode
#
# @top-id: #optional In secondary mode, node name or device ID of the root
-# node who owns the replication node chain. Ignored in primary mode.
+# node who owns the replication node chain. Must not be given in
+# primary mode.
#
# Since: 2.8
##
--
1.8.3.1
- [Qemu-block] [PULL 11/23] quorum: change child_iter to children_read, (continued)
- [Qemu-block] [PULL 11/23] quorum: change child_iter to children_read, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 16/23] block: Support meta dirty bitmap, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 17/23] block: Add two dirty bitmap getters, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 18/23] block: Assert that bdrv_release_dirty_bitmap succeeded, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 15/23] tests: Add test code for meta bitmap, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 12/23] quorum: do not allocate multiple iovecs for FIFO strategy, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 19/23] hbitmap: serialization, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 14/23] HBitmap: Introduce "meta" bitmap to track bit changes, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 22/23] block: More operations for meta dirty bitmap, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 21/23] tests: Add test code for hbitmap serialization, Kevin Wolf, 2016/10/24
- [Qemu-block] [PULL 23/23] block/replication: Clarify 'top-id' parameter usage,
Kevin Wolf <=
- [Qemu-block] [PULL 20/23] block: BdrvDirtyBitmap serialization interface, Kevin Wolf, 2016/10/24
- Re: [Qemu-block] [Qemu-devel] [PULL 00/23] Block layer patches, Peter Maydell, 2016/10/24
- [Qemu-block] [PULL 00/23] Block layer patches, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 02/23] block: Use blk_co_pdiscard() for all BB level discard, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 03/23] block: Remove bdrv_aio_pdiscard(), Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 01/23] block: Use blk_co_flush() for all BB level flushes, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 04/23] block: Use blk_co_ioctl() for all BB level ioctls, Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 05/23] raw-posix: Don't use bdrv_ioctl(), Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 06/23] block: Remove bdrv_ioctl(), Kevin Wolf, 2016/10/27
- [Qemu-block] [PULL 08/23] raw: Implement .bdrv_co_ioctl instead of .bdrv_aio_ioctl, Kevin Wolf, 2016/10/27