From: Juan Quintela <quintela@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/5] savevm: improve subsections detection on load
Date: Fri, 07 Oct 2011 00:42:36 +0200 [thread overview]
Message-ID: <m3ipo13foj.fsf@trasno.mitica> (raw)
In-Reply-To: <4E8DD6D1.7020708@redhat.com> (Paolo Bonzini's message of "Thu, 06 Oct 2011 18:26:57 +0200")
Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 10/06/2011 06:21 PM, Juan Quintela wrote:
>> +
>> +int qemu_get_buffer(QEMUFile *f, uint8_t *buf, int size)
>> +{
>> + int pending = size;
>> + int done = 0;
>> +
>> + while (pending> 0) {
>> + int res;
>> +
>> + res = qemu_peek_buffer(f, buf, pending, 0);
>> + if (res == 0) {
>> + return 0;
should this line return "done" insntead?
>> }
>> - memcpy(buf, f->buf + f->buf_index, l);
>> - f->buf_index += l;
>> - buf += l;
>> - size -= l;
>> + qemu_file_skip(f, res);
>> + buf += res;
>> + pending -= res;
>> + done += res;
>> }
>> - return size1 - size;
>> + return done;
>> }
>
> This changes semantics for reads above 32KB. It should be in the
> commit message, or preferably v1 could be committed instead. :)
how it changes? My understanding is that we read the same, only change
that I can think of is the one that I have jsut shown (and that is on
the error case).
Later, Juan.
next prev parent reply other threads:[~2011-10-06 22:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-06 16:21 [Qemu-devel] [PATCH 0/5] migration: Improve subsections detection Juan Quintela
2011-10-06 16:21 ` [Qemu-devel] [PATCH 1/5] savevm: teach qemu_fill_buffer to do partial refills Juan Quintela
2011-10-06 16:21 ` [Qemu-devel] [PATCH 2/5] savevm: some coding style cleanups Juan Quintela
2011-10-06 16:21 ` [Qemu-devel] [PATCH 3/5] savevm: define qemu_get_byte() using qemu_peek_byte() Juan Quintela
2011-10-06 16:26 ` Paolo Bonzini
2011-10-06 22:40 ` Juan Quintela
2011-10-06 16:21 ` [Qemu-devel] [PATCH 4/5] savevm: improve subsections detection on load Juan Quintela
2011-10-06 16:26 ` Paolo Bonzini
2011-10-06 22:42 ` Juan Quintela [this message]
2011-10-07 6:37 ` Paolo Bonzini
2011-10-06 16:21 ` [Qemu-devel] [PATCH 5/5] Revert "savevm: fix corruption in vmstate_subsection_load()." Juan Quintela
-- strict thread matches above, loose matches on Subject: below --
2011-10-07 10:53 [Qemu-devel] [PATCH v3 0/5] migration: Improve subsections detection Juan Quintela
2011-10-07 10:53 ` [Qemu-devel] [PATCH 4/5] savevm: improve subsections detection on load Juan Quintela
2011-10-09 19:49 [Qemu-devel] [PATCH v4 0/5] Improve subsections detection Juan Quintela
2011-10-09 19:50 ` [Qemu-devel] [PATCH 4/5] savevm: improve subsections detection on load Juan Quintela
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=m3ipo13foj.fsf@trasno.mitica \
--to=quintela@redhat.com \
--cc=pbonzini@redhat.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.