[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 5/8] blockdev: fix bitmap clear undo
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 5/8] blockdev: fix bitmap clear undo |
Date: |
Fri, 17 Mar 2017 14:15:43 +0100 |
From: John Snow <address@hidden>
Only undo the action if we actually prepared the action.
Signed-off-by: John Snow <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
blockdev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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)
--
1.8.3.1
- [Qemu-block] [PULL 0/8] Block layer fixes for 2.9.0-rc1, Kevin Wolf, 2017/03/17
- [Qemu-block] [PULL 1/8] file-posix: clean up max_segments buffer termination, Kevin Wolf, 2017/03/17
- [Qemu-block] [PULL 2/8] replication: clarify permissions, Kevin Wolf, 2017/03/17
- [Qemu-block] [PULL 5/8] blockdev: fix bitmap clear undo,
Kevin Wolf <=
- [Qemu-block] [PULL 6/8] block: Propagate error in bdrv_open_backing_file, Kevin Wolf, 2017/03/17
- [Qemu-block] [PULL 3/8] file-posix: Don't leak fd in hdev_get_max_segments, Kevin Wolf, 2017/03/17
- [Qemu-block] [PULL 7/8] thread-pool: add missing qemu_bh_cancel in completion function, Kevin Wolf, 2017/03/17
- [Qemu-block] [PULL 4/8] block: Always call bdrv_child_check_perm first, Kevin Wolf, 2017/03/17
- [Qemu-block] [PULL 8/8] block: quiesce AioContext when detaching from it, Kevin Wolf, 2017/03/17
- Re: [Qemu-block] [Qemu-devel] [PULL 0/8] Block layer fixes for 2.9.0-rc1, Peter Maydell, 2017/03/17