* [Qemu-devel] [PATCH] sheepdog: fix savevm and loadvm
@ 2012-08-29 18:39 MORITA Kazutaka
2012-08-30 15:59 ` Kevin Wolf
0 siblings, 1 reply; 2+ messages in thread
From: MORITA Kazutaka @ 2012-08-29 18:39 UTC (permalink / raw)
To: kwolf; +Cc: qemu-devel
This patch sets data to be sent to Sheepdog correctly and fixes savevm
and loadvm operations on a Sheepdog image.
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
---
block/sheepdog.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/block/sheepdog.c b/block/sheepdog.c
index df4f441..e0753ee 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1986,7 +1986,7 @@ static int do_load_save_vmstate(BDRVSheepdogState *s, uint8_t *data,
vdi_index = pos / SD_DATA_OBJ_SIZE;
offset = pos % SD_DATA_OBJ_SIZE;
- data_len = MIN(remaining, SD_DATA_OBJ_SIZE);
+ data_len = MIN(remaining, SD_DATA_OBJ_SIZE - offset);
vmstate_oid = vid_to_vmstate_oid(s->inode.vdi_id, vdi_index);
@@ -2007,6 +2007,7 @@ static int do_load_save_vmstate(BDRVSheepdogState *s, uint8_t *data,
}
pos += data_len;
+ data += data_len;
remaining -= data_len;
}
ret = size;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] sheepdog: fix savevm and loadvm
2012-08-29 18:39 [Qemu-devel] [PATCH] sheepdog: fix savevm and loadvm MORITA Kazutaka
@ 2012-08-30 15:59 ` Kevin Wolf
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Wolf @ 2012-08-30 15:59 UTC (permalink / raw)
To: MORITA Kazutaka; +Cc: qemu-devel
Am 29.08.2012 20:39, schrieb MORITA Kazutaka:
> This patch sets data to be sent to Sheepdog correctly and fixes savevm
> and loadvm operations on a Sheepdog image.
>
> Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-30 15:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-29 18:39 [Qemu-devel] [PATCH] sheepdog: fix savevm and loadvm MORITA Kazutaka
2012-08-30 15:59 ` Kevin Wolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).