qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>,
	qemu-devel@nongnu.org,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] scsi: esp: fix migration
Date: Mon, 27 Jun 2016 09:54:24 +0200	[thread overview]
Message-ID: <b7a3186a-0be3-6fb7-a2c1-1ee65e827216@redhat.com> (raw)
In-Reply-To: <20160627072050.GD1389@grmbl.mre>



On 27/06/2016 09:20, Amit Shah wrote:
> On (Mon) 20 Jun 2016 [16:33:26], Paolo Bonzini wrote:
>> Commit 926cde5 ("scsi: esp: make cmdbuf big enough for maximum CDB size",
>> 2016-06-16) changed the size of a migrated field.  Split it in two
>> parts, and only migrate the second part in a new vmstate version.
> 
> With this patch, the static checker fails in this way:
> 
> Section "esp", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
> Section "dc390", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
> Section "am53c974", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest
> 
> Note it doesn't complain about the version numbers.  That's because:
> 
>>  const VMStateDescription vmstate_esp = {
>>      .name ="esp",
>> -    .version_id = 3,
>> +    .version_id = 4,
>>      .minimum_version_id = 3,
> 
> this suggests older versions can still be accepted for incoming
> migration, which isn't true.

Sure they can:

-        VMSTATE_BUFFER(cmdbuf, ESPState),
+        VMSTATE_PARTIAL_BUFFER(cmdbuf, ESPState, 16),
+        VMSTATE_BUFFER_START_MIDDLE_V(cmdbuf, ESPState, 16, 4),

2.6 is transmitting version 3 and a 16-byte buffer.

2.7 is transmitting version 4, a first 16-byte buffer, and a second
16-byte buffer that is skipped when receiving version 3.

So it seems like a static checker limitation.

Paolo

  reply	other threads:[~2016-06-27  7:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-20 14:33 [Qemu-devel] [PATCH] scsi: esp: fix migration Paolo Bonzini
2016-06-27  7:20 ` Amit Shah
2016-06-27  7:54   ` Paolo Bonzini [this message]
2016-06-29 12:00     ` Juan Quintela
2016-07-08 10:21       ` Amit Shah
2016-07-08 10:59         ` Paolo Bonzini
2016-07-08 10:19     ` Amit Shah

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=b7a3186a-0be3-6fb7-a2c1-1ee65e827216@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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).