[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v6 23/42] blockdev: Use CAF in external_snapshot_pre
From: |
Max Reitz |
Subject: |
[Qemu-devel] [PATCH v6 23/42] blockdev: Use CAF in external_snapshot_prepare() |
Date: |
Fri, 9 Aug 2019 18:13:48 +0200 |
This allows us to differentiate between filters and nodes with COW
backing files: Filters cannot be used as overlays at all (for this
function).
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
blockdev.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/blockdev.c b/blockdev.c
index 29c6c6044a..c540802127 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1664,7 +1664,12 @@ static void external_snapshot_prepare(BlkActionState
*common,
goto out;
}
- if (state->new_bs->backing != NULL) {
+ if (state->new_bs->drv->is_filter) {
+ error_setg(errp, "Filters cannot be used as overlays");
+ goto out;
+ }
+
+ if (bdrv_filtered_cow_child(state->new_bs)) {
error_setg(errp, "The overlay already has a backing image");
goto out;
}
--
2.21.0
- [Qemu-devel] [PATCH v6 19/42] block: Use CAF in bdrv_co_rw_vmstate(), (continued)
[Qemu-devel] [PATCH v6 23/42] blockdev: Use CAF in external_snapshot_prepare(),
Max Reitz <=
[Qemu-devel] [PATCH v6 24/42] block: Use child access functions for QAPI queries, Max Reitz, 2019/08/09
[Qemu-devel] [PATCH v6 26/42] backup: Deal with filters, Max Reitz, 2019/08/09
[Qemu-devel] [PATCH v6 25/42] mirror: Deal with filters, Max Reitz, 2019/08/09
Re: [Qemu-devel] [PATCH v6 25/42] mirror: Deal with filters, Vladimir Sementsov-Ogievskiy, 2019/08/31
[Qemu-devel] [PATCH v6 27/42] commit: Deal with filters, Max Reitz, 2019/08/09