[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/10] block: Fix blockdev-snapshot error handli
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 05/10] block: Fix blockdev-snapshot error handling |
Date: |
Mon, 6 Mar 2017 14:23:32 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 03/06/2017 10:21 AM, Kevin Wolf wrote:
> For blockdev-snapshot, external_snapshot_prepare() accepts an arbitrary
> node reference at first and only checks later whether it already has a
> backing file. Between those places, other errors can occur.
>
> Therefore checking in external_snapshot_abort() whether state->new_bs
> has a backing file is not sufficient to tell whether bdrv_append() was
> already completed or not. Trying to undo the bdrv_append() when it
> wasn't even executed is wrong.
>
> Introduce a new boolean flag in the state to fix this.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> blockdev.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
Reviewed-by: Eric Blake <address@hidden>
By the way, how are you finding all these spots? Is it existing qemu-io
tests that are failing? And if so, would mentioning which test exposed
the problem being fixed be worth adding in the commit messages? If not,
are there some qemu-io tests to be added?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 02/10] mirror: Fix permission problem with 'replaces', (continued)
- [Qemu-devel] [PATCH 02/10] mirror: Fix permission problem with 'replaces', Kevin Wolf, 2017/03/06
- [Qemu-devel] [PATCH 03/10] mirror: Fix permissions for removing mirror_top_bs, Kevin Wolf, 2017/03/06
- [Qemu-devel] [PATCH 04/10] mirror: Fix error path for dirty bitmap creation, Kevin Wolf, 2017/03/06
- [Qemu-devel] [PATCH 06/10] block: Factor out should_update_child(), Kevin Wolf, 2017/03/06
- [Qemu-devel] [PATCH 05/10] block: Fix blockdev-snapshot error handling, Kevin Wolf, 2017/03/06
- Re: [Qemu-devel] [PATCH 05/10] block: Fix blockdev-snapshot error handling,
Eric Blake <=
- [Qemu-devel] [PATCH 07/10] block: Factor out bdrv_replace_child_noperm(), Kevin Wolf, 2017/03/06
- [Qemu-devel] [PATCH 08/10] block: Ignore multiple children in bdrv_check_update_perm(), Kevin Wolf, 2017/03/06
- [Qemu-devel] [PATCH 09/10] block: Handle permission errors in change_parent_backing_link(), Kevin Wolf, 2017/03/06
- [Qemu-devel] [PATCH 10/10] block: Fix error handling in bdrv_replace_in_backing_chain(), Kevin Wolf, 2017/03/06
- Re: [Qemu-devel] [PATCH 00/10] block: Op blocker fixes, Fam Zheng, 2017/03/07