aboutsummaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2018-07-02 15:46:29 -0400
committerEric Blake <eblake@redhat.com>2018-07-02 15:23:54 -0500
commit930fe17f9900e9c879834f2d2e5c301992623332 (patch)
tree0ac6b28082fe6bc5635a0a2de812e01c157f3793 /blockdev.c
parent8ee1cef4593a7bda076891470c0620e79333c0d0 (diff)
blockdev: enable non-root nodes for backup source
This is needed to implement the image-fleecing workflow where we create a temporary node backed by an active node, then start backupdev-backup sync=none from the active node to the temp node. In this case, the active node is now a root node AND a backing node, so it no longer qualifies as a root node, so we loosen the restriction on which nodes can be considered as the source for a backup. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Message-Id: <20180702194630.9360-2-jsnow@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r--blockdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/blockdev.c b/blockdev.c
index 58d7570932..72f5347df5 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1859,7 +1859,7 @@ static void blockdev_backup_prepare(BlkActionState *common, Error **errp)
assert(common->action->type == TRANSACTION_ACTION_KIND_BLOCKDEV_BACKUP);
backup = common->action->u.blockdev_backup.data;
- bs = qmp_get_root_bs(backup->device, errp);
+ bs = bdrv_lookup_bs(backup->device, backup->device, errp);
if (!bs) {
return;
}
@@ -3517,7 +3517,7 @@ BlockJob *do_blockdev_backup(BlockdevBackup *backup, JobTxn *txn,
backup->compress = false;
}
- bs = qmp_get_root_bs(backup->device, errp);
+ bs = bdrv_lookup_bs(backup->device, backup->device, errp);
if (!bs) {
return NULL;
}