[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v15 02/24] block: implement bdrv_snapshot_goto for b
From: |
Pavel Dovgalyuk |
Subject: |
[Qemu-devel] [PATCH v15 02/24] block: implement bdrv_snapshot_goto for blkreplay |
Date: |
Mon, 18 Mar 2019 12:27:36 +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 b5d9efdeca..142dfe3157 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 v15 06/24] replay: finish record/replay before closing the disks, (continued)
- [Qemu-devel] [PATCH v15 06/24] replay: finish record/replay before closing the disks, Pavel Dovgalyuk, 2019/03/18
- [Qemu-devel] [PATCH v15 04/24] replay: update docs for record/replay with block devices, Pavel Dovgalyuk, 2019/03/18
- [Qemu-devel] [PATCH v15 16/24] gdbstub: add reverse step support in replay mode, Pavel Dovgalyuk, 2019/03/18
- [Qemu-devel] [PATCH v15 12/24] replay: introduce breakpoint at the specified step, Pavel Dovgalyuk, 2019/03/18
- [Qemu-devel] [PATCH v15 13/24] replay: implement replay-seek command, Pavel Dovgalyuk, 2019/03/18
- [Qemu-devel] [PATCH v15 15/24] replay: flush rr queue before loading the vmstate, Pavel Dovgalyuk, 2019/03/18
- [Qemu-devel] [PATCH v15 14/24] replay: refine replay-time module, Pavel Dovgalyuk, 2019/03/18
- [Qemu-devel] [PATCH v15 10/24] qapi: introduce replay.json for record/replay-related stuff, Pavel Dovgalyuk, 2019/03/18
- [Qemu-devel] [PATCH v15 07/24] qcow2: introduce icount field for snapshots, Pavel Dovgalyuk, 2019/03/18
- [Qemu-devel] [PATCH v15 09/24] replay: provide an accessor for rr filename, Pavel Dovgalyuk, 2019/03/18
- [Qemu-devel] [PATCH v15 02/24] block: implement bdrv_snapshot_goto for blkreplay,
Pavel Dovgalyuk <=
- [Qemu-devel] [PATCH v15 05/24] replay: don't drain/flush bdrv queue while RR is working, Pavel Dovgalyuk, 2019/03/18
- [Qemu-devel] [PATCH v15 03/24] replay: disable default snapshot for record/replay, Pavel Dovgalyuk, 2019/03/18
- [Qemu-devel] [PATCH v15 01/24] replay: add missing fix for internal function, Pavel Dovgalyuk, 2019/03/18