[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/11] sheepdog: fix savevm and loadvm
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 01/11] sheepdog: fix savevm and loadvm |
Date: |
Fri, 14 Sep 2012 14:39:02 +0200 |
From: MORITA Kazutaka <address@hidden>
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 <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
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.6.5
- [Qemu-devel] [PULL 00/11] Block patches, Kevin Wolf, 2012/09/14
- [Qemu-devel] [PATCH 04/11] block/curl: Fix wrong free statement, Kevin Wolf, 2012/09/14
- [Qemu-devel] [PATCH 05/11] vdi: Fix warning from clang, Kevin Wolf, 2012/09/14
- [Qemu-devel] [PATCH 01/11] sheepdog: fix savevm and loadvm,
Kevin Wolf <=
- [Qemu-devel] [PATCH 08/11] qapi: Add SnapshotInfo and ImageInfo., Kevin Wolf, 2012/09/14
- [Qemu-devel] [PATCH 02/11] ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0, Kevin Wolf, 2012/09/14
- [Qemu-devel] [PATCH 07/11] ahci: properly reset PxCMD on HBA reset, Kevin Wolf, 2012/09/14
- [Qemu-devel] [PATCH 03/11] ide: Fix error messages from static code analysis (no real error), Kevin Wolf, 2012/09/14
- [Qemu-devel] [PATCH 06/11] block: fix block tray status, Kevin Wolf, 2012/09/14
- [Qemu-devel] [PATCH 10/11] Don't require encryption password for 'qemu-img info' command, Kevin Wolf, 2012/09/14
- [Qemu-devel] [PATCH 09/11] qemu-img: Add json output option to the info command., Kevin Wolf, 2012/09/14
- [Qemu-devel] [PATCH 11/11] block: Don't forget to delete temporary file, Kevin Wolf, 2012/09/14
- Re: [Qemu-devel] [PULL 00/11] Block patches, Anthony Liguori, 2012/09/17
- Re: [Qemu-devel] [PULL 00/11] Block patches, Michael Tokarev, 2012/09/18