aboutsummaryrefslogtreecommitdiff
path: root/block/sheepdog.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-04-05 21:27:53 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2013-04-15 08:26:18 +0200
commitcf8074b3825f7229a20c60e679511592bde41340 (patch)
tree0d44731c8ec33903dd131295f76c8cd6da9b9c7a /block/sheepdog.c
parente2ec3f976803b360c70d9ae2ba13852fa5d11665 (diff)
block: Introduce bdrv_writev_vmstate
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/sheepdog.c')
-rw-r--r--block/sheepdog.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index 987018e20c..1c5b53220b 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -2054,12 +2054,19 @@ cleanup:
return ret;
}
-static int sd_save_vmstate(BlockDriverState *bs, const uint8_t *data,
- int64_t pos, int size)
+static int sd_save_vmstate(BlockDriverState *bs, QEMUIOVector *qiov,
+ int64_t pos)
{
BDRVSheepdogState *s = bs->opaque;
+ void *buf;
+ int ret;
- return do_load_save_vmstate(s, (uint8_t *)data, pos, size, 0);
+ buf = qemu_blockalign(bs, qiov->size);
+ qemu_iovec_to_buf(qiov, 0, buf, qiov->size);
+ ret = do_load_save_vmstate(s, (uint8_t *) buf, pos, qiov->size, 0);
+ qemu_vfree(buf);
+
+ return ret;
}
static int sd_load_vmstate(BlockDriverState *bs, uint8_t *data,