Blame SOURCES/kvm-blockdev-enable-non-root-nodes-for-backup-source.patch

1bdc94
From 305bd87b4d721989679d4c3407e355e032e2c005 Mon Sep 17 00:00:00 2001
1bdc94
From: John Snow <jsnow@redhat.com>
1bdc94
Date: Wed, 18 Jul 2018 22:54:46 +0200
1bdc94
Subject: [PATCH 61/89] blockdev: enable non-root nodes for backup source
1bdc94
1bdc94
RH-Author: John Snow <jsnow@redhat.com>
1bdc94
Message-id: <20180718225511.14878-11-jsnow@redhat.com>
1bdc94
Patchwork-id: 81395
1bdc94
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 10/35] blockdev: enable non-root nodes for backup source
1bdc94
Bugzilla: 1207657
1bdc94
RH-Acked-by: Eric Blake <eblake@redhat.com>
1bdc94
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
1bdc94
RH-Acked-by: Fam Zheng <famz@redhat.com>
1bdc94
1bdc94
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
1bdc94
1bdc94
This is needed to implement the image-fleecing workflow where we
1bdc94
create a temporary node backed by an active node, then start
1bdc94
backupdev-backup sync=none from the active node to the temp node.
1bdc94
1bdc94
In this case, the active node is now a root node AND a backing node,
1bdc94
so it no longer qualifies as a root node, so we loosen the restriction
1bdc94
on which nodes can be considered as the source for a backup.
1bdc94
1bdc94
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
1bdc94
Reviewed-by: Eric Blake <eblake@redhat.com>
1bdc94
Signed-off-by: John Snow <jsnow@redhat.com>
1bdc94
Message-Id: <20180702194630.9360-2-jsnow@redhat.com>
1bdc94
Signed-off-by: Eric Blake <eblake@redhat.com>
1bdc94
(cherry picked from commit 930fe17f9900e9c879834f2d2e5c301992623332)
1bdc94
Signed-off-by: John Snow <jsnow@redhat.com>
1bdc94
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
1bdc94
---
1bdc94
 blockdev.c | 4 ++--
1bdc94
 1 file changed, 2 insertions(+), 2 deletions(-)
1bdc94
1bdc94
diff --git a/blockdev.c b/blockdev.c
1bdc94
index 9beef10..baa7e18 100644
1bdc94
--- a/blockdev.c
1bdc94
+++ b/blockdev.c
1bdc94
@@ -2010,7 +2010,7 @@ static void blockdev_backup_prepare(BlkActionState *common, Error **errp)
1bdc94
     assert(common->action->type == TRANSACTION_ACTION_KIND_BLOCKDEV_BACKUP);
1bdc94
     backup = common->action->u.blockdev_backup.data;
1bdc94
 
1bdc94
-    bs = qmp_get_root_bs(backup->device, errp);
1bdc94
+    bs = bdrv_lookup_bs(backup->device, backup->device, errp);
1bdc94
     if (!bs) {
1bdc94
         return;
1bdc94
     }
1bdc94
@@ -3674,7 +3674,7 @@ BlockJob *do_blockdev_backup(BlockdevBackup *backup, JobTxn *txn,
1bdc94
         backup->compress = false;
1bdc94
     }
1bdc94
 
1bdc94
-    bs = qmp_get_root_bs(backup->device, errp);
1bdc94
+    bs = bdrv_lookup_bs(backup->device, backup->device, errp);
1bdc94
     if (!bs) {
1bdc94
         return NULL;
1bdc94
     }
1bdc94
-- 
1bdc94
1.8.3.1
1bdc94