[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] 'drive-mirror' vs. 'blockdev-mirror' semantics
From: |
Kashyap Chamarthy |
Subject: |
[Qemu-block] 'drive-mirror' vs. 'blockdev-mirror' semantics |
Date: |
Tue, 16 Aug 2016 23:28:21 +0200 |
User-agent: |
Mutt/1.6.0.1 (2016-04-01) |
Hi,
>From the QAPI schema documentation of 'blockdev-mirror':
# @target: the id or node-name of the block device to mirror to. This
mustn't be attached to guest.
Why must the target, prepared by 'blockdev-add', be not attached to the
guest? (Side question: is this via 'device_add' HMP comand, which
handles the guest-visible "frontend" aspect?) John mentioned on IRC
that this is may be something do with Linux AIO contexts.
>From the DriveMirror structure documentation (and from my own tests of
'drive-mirror' to different targets -- local file, NBD over
UnixSocketAddress, NBD over InetSocketAddress) I don't see such a
limitation.
* * *
I was taking notes on the subtle difference between 'drive-mirror' &
'blockdev-mirror' (I realize this operates with the new 'blockdev-*'
infrastructure, which will be the future, once 'blockdev-add' goes out
of experimental, perhaps).
.---------------------------------------------------------------------.
| drive-mirror | blockdev-mirror |
----------------------------------------------------------------------
| 'target' will be created if not | 'target' needs to be explicitly |
| specified; or an existing target | created by `blockdev-add`, which|
| can be used if it exists | assigns a name to the to-be |
| | created node |
-----------------------------------------------------------------------
| 'target' device can be | The block-core.json file tells |
| attached to the guest | us that the 'target' "mustn't |
| | be attached to the guest" |
-----------------------------------------------------------------------
| Can specify an (optional) | No 'node-name' parameter, |
| 'node-name' parameter ("the new | because `blockdev-add` sets |
| block driver state node name in | up the 'node-name'[*] |
| the graph") for the target | |
-----------------------------------------------------------------------
[*] On the topic of 'node-name' parameter, I now see that Kevin has
applied his series "[PATCH v5 00/11] block: Accept node-name in all
node level QMP commands" will address this, with the below specific
patch. [/me noticed that this series is now applied to the
'block-next' Git branch]:
PATCH v5 04/11] block: Accept node-name for blockdev-mirror --
https://lists.nongnu.org/archive/html/qemu-devel/2016-08/msg00540.html
--
/kashyap
- [Qemu-block] 'drive-mirror' vs. 'blockdev-mirror' semantics,
Kashyap Chamarthy <=