[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] blockdev: fix bitmap clear undo
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] blockdev: fix bitmap clear undo |
Date: |
Wed, 15 Mar 2017 17:14:57 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 03/15/2017 04:28 PM, John Snow wrote:
> Only undo the action if we actually prepared the action.
>
> Signed-off-by: John Snow <address@hidden>
> ---
> blockdev.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake <address@hidden>
>
> diff --git a/blockdev.c b/blockdev.c
> index f1f49bd..c5b2c2c 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -2047,7 +2047,9 @@ static void
> block_dirty_bitmap_clear_abort(BlkActionState *common)
> BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState,
> common, common);
>
> - bdrv_undo_clear_dirty_bitmap(state->bitmap, state->backup);
> + if (state->backup) {
> + bdrv_undo_clear_dirty_bitmap(state->bitmap, state->backup);
> + }
> }
>
> static void block_dirty_bitmap_clear_commit(BlkActionState *common)
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature