[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 1/3] block: implement bdrv_snapshot_goto for blkrepl
From: |
Pavel Dovgalyuk |
Subject: |
[Qemu-block] [PATCH 1/3] block: implement bdrv_snapshot_goto for blkreplay |
Date: |
Tue, 31 Jan 2017 14:57:34 +0300 |
User-agent: |
StGit/0.16 |
This patch enables making snapshots with blkreplay used in
block devices.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
block/blkreplay.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/block/blkreplay.c b/block/blkreplay.c
index a741654..8a03d62 100644
--- a/block/blkreplay.c
+++ b/block/blkreplay.c
@@ -130,6 +130,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);
+}
+
static BlockDriver bdrv_blkreplay = {
.format_name = "blkreplay",
.protocol_name = "blkreplay",
@@ -145,6 +151,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)