[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH for-4.2 02/14] block: implement bdrv_snapshot_goto f
From: |
Pavel Dovgalyuk |
Subject: |
[Qemu-devel] [PATCH for-4.2 02/14] block: implement bdrv_snapshot_goto for blkreplay |
Date: |
Wed, 24 Jul 2019 11:43:25 +0300 |
User-agent: |
StGit/0.17.1-dirty |
From: Pavel Dovgalyuk <address@hidden>
This patch enables making snapshots with blkreplay used in
block devices.
This function is required to make bdrv_snapshot_goto without
calling .bdrv_open which is not implemented.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
Acked-by: Kevin Wolf <address@hidden>
---
block/blkreplay.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/block/blkreplay.c b/block/blkreplay.c
index 2b7931b940..c96ac8f4bc 100644
--- a/block/blkreplay.c
+++ b/block/blkreplay.c
@@ -126,6 +126,12 @@ static int coroutine_fn
blkreplay_co_flush(BlockDriverState *bs)
return ret;
}
+static int blkreplay_snapshot_goto(BlockDriverState *bs,
+ const char *snapshot_id)
+{
+ return bdrv_snapshot_goto(bs->file->bs, snapshot_id, NULL);
+}
+
static BlockDriver bdrv_blkreplay = {
.format_name = "blkreplay",
.instance_size = 0,
@@ -140,6 +146,8 @@ static BlockDriver bdrv_blkreplay = {
.bdrv_co_pwrite_zeroes = blkreplay_co_pwrite_zeroes,
.bdrv_co_pdiscard = blkreplay_co_pdiscard,
.bdrv_co_flush = blkreplay_co_flush,
+
+ .bdrv_snapshot_goto = blkreplay_snapshot_goto,
};
static void bdrv_blkreplay_init(void)
- [Qemu-devel] [PATCH for-4.2 00/14] Some record/replay fixes, Pavel Dovgalyuk, 2019/07/24
- [Qemu-devel] [PATCH for-4.2 01/14] replay: add missing fix for internal function, Pavel Dovgalyuk, 2019/07/24
- [Qemu-devel] [PATCH for-4.2 02/14] block: implement bdrv_snapshot_goto for blkreplay,
Pavel Dovgalyuk <=
- [Qemu-devel] [PATCH for-4.2 03/14] replay: disable default snapshot for record/replay, Pavel Dovgalyuk, 2019/07/24
- [Qemu-devel] [PATCH for-4.2 04/14] replay: update docs for record/replay with block devices, Pavel Dovgalyuk, 2019/07/24
- [Qemu-devel] [PATCH for-4.2 05/14] replay: don't drain/flush bdrv queue while RR is working, Pavel Dovgalyuk, 2019/07/24
- [Qemu-devel] [PATCH for-4.2 06/14] replay: finish record/replay before closing the disks, Pavel Dovgalyuk, 2019/07/24
- [Qemu-devel] [PATCH for-4.2 07/14] replay: provide an accessor for rr filename, Pavel Dovgalyuk, 2019/07/24
- [Qemu-devel] [PATCH for-4.2 08/14] replay: add BH oneshot event for block layer, Pavel Dovgalyuk, 2019/07/24
- [Qemu-devel] [PATCH for-4.2 09/14] replay: document development rules, Pavel Dovgalyuk, 2019/07/24
- [Qemu-devel] [PATCH for-4.2 10/14] util/qemu-timer: refactor deadline calculation for external timers, Pavel Dovgalyuk, 2019/07/24