diff options
author | Kevin Wolf <kwolf@redhat.com> | 2016-04-12 16:20:59 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-05-25 19:04:21 +0200 |
commit | b8804815799eb8e924f015de6d1710cbd5b932ee (patch) | |
tree | 566226f0163d15fe62cb71a476ba9f38992f4049 /blockdev.c | |
parent | 03e35d820d18f23606b4cc821a36cda1f7936170 (diff) |
mirror: Allow target that already has a BlockBackend
We had to forbid mirroring to a target BDS that already had a BB
attached because the node swapping at job completion would add a second
BB and we didn't support multiple BBs on a single BDS at the time. Now
we do, so we can lift the restriction.
As we allow additional BlockBackends for the target, we must expect
other users to be sending requests. There may no requests be in flight
during the graph modification, so we have to drain those users now.
The core part of this patch is a revert of commit 40365552.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/blockdev.c b/blockdev.c index af0b022e6f..3c06746456 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3459,10 +3459,6 @@ static void blockdev_mirror_common(BlockDriverState *bs, if (bdrv_op_is_blocked(target, BLOCK_OP_TYPE_MIRROR_TARGET, errp)) { return; } - if (bdrv_has_blk(target)) { - error_setg(errp, "Cannot mirror to an attached block device"); - return; - } if (!bs->backing && sync == MIRROR_SYNC_MODE_TOP) { sync = MIRROR_SYNC_MODE_FULL; |