[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 23/42] blockdev: Use CAF in external_snapshot
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [Qemu-devel] [PATCH v5 23/42] blockdev: Use CAF in external_snapshot_prepare() |
Date: |
Fri, 14 Jun 2019 15:46:35 +0000 |
13.06.2019 1:09, Max Reitz wrote:
> 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>
Overlay created in snapshot operation assumed to consume following writes
and it's filtered child becomes readonly.. And filter works in completely
another
way.
Reviewed-by: Vladimir Sementsov-Ogievskiy <address@hidden>
[hmm, I start to like using "filtered child" collocation when I say about this
thing.
didn't you think about renaming backing chain to filtered chain?]
> ---
> blockdev.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/blockdev.c b/blockdev.c
> index b5c0fd3c49..0f0cf0d9ae 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -1665,7 +1665,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;
> }
>
--
Best regards,
Vladimir
- [Qemu-devel] [PATCH v5 18/42] block: Use CAFs in bdrv_refresh_filename(), (continued)
- [Qemu-devel] [PATCH v5 18/42] block: Use CAFs in bdrv_refresh_filename(), Max Reitz, 2019/06/12
- [Qemu-devel] [PATCH v5 21/42] block: Use CAFs for debug breakpoints, Max Reitz, 2019/06/12
- [Qemu-devel] [PATCH v5 20/42] block/snapshot: Fall back to storage child, Max Reitz, 2019/06/12
- [Qemu-devel] [PATCH v5 23/42] blockdev: Use CAF in external_snapshot_prepare(), Max Reitz, 2019/06/12
- Re: [Qemu-devel] [PATCH v5 23/42] blockdev: Use CAF in external_snapshot_prepare(),
Vladimir Sementsov-Ogievskiy <=
- [Qemu-devel] [PATCH v5 22/42] block: Use CAFs in bdrv_get_allocated_file_size(), Max Reitz, 2019/06/12
- [Qemu-devel] [PATCH v5 25/42] mirror: Deal with filters, Max Reitz, 2019/06/12