From: Kevin Wolf <kwolf@redhat.com>
To: anthony@codemonkey.ws
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 01/11] sheepdog: fix savevm and loadvm
Date: Fri, 14 Sep 2012 14:39:02 +0200 [thread overview]
Message-ID: <1347626352-6023-2-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1347626352-6023-1-git-send-email-kwolf@redhat.com>
From: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
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>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
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
next prev parent reply other threads:[~2012-09-14 12:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 12:39 [Qemu-devel] [PULL 00/11] Block patches Kevin Wolf
2012-09-14 12:39 ` Kevin Wolf [this message]
2012-09-14 12:39 ` [Qemu-devel] [PATCH 02/11] ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0 Kevin Wolf
2012-09-14 12:39 ` [Qemu-devel] [PATCH 03/11] ide: Fix error messages from static code analysis (no real error) Kevin Wolf
2012-09-14 12:39 ` [Qemu-devel] [PATCH 04/11] block/curl: Fix wrong free statement Kevin Wolf
2012-09-14 12:39 ` [Qemu-devel] [PATCH 05/11] vdi: Fix warning from clang Kevin Wolf
2012-09-14 12:39 ` [Qemu-devel] [PATCH 06/11] block: fix block tray status Kevin Wolf
2012-09-14 12:39 ` [Qemu-devel] [PATCH 07/11] ahci: properly reset PxCMD on HBA reset Kevin Wolf
2012-09-14 12:39 ` [Qemu-devel] [PATCH 08/11] qapi: Add SnapshotInfo and ImageInfo Kevin Wolf
2012-09-14 12:39 ` [Qemu-devel] [PATCH 09/11] qemu-img: Add json output option to the info command Kevin Wolf
2012-09-14 12:39 ` [Qemu-devel] [PATCH 10/11] Don't require encryption password for 'qemu-img info' command Kevin Wolf
2012-09-14 12:39 ` [Qemu-devel] [PATCH 11/11] block: Don't forget to delete temporary file Kevin Wolf
2012-09-17 18:19 ` [Qemu-devel] [PULL 00/11] Block patches Anthony Liguori
2012-09-18 17:49 ` Michael Tokarev
2012-09-19 8:42 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1347626352-6023-2-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).