From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHQqq-00049D-Eq for qemu-devel@nongnu.org; Mon, 27 Jun 2016 03:21:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHQqk-0002GE-Fw for qemu-devel@nongnu.org; Mon, 27 Jun 2016 03:20:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHQqk-0002G6-AM for qemu-devel@nongnu.org; Mon, 27 Jun 2016 03:20:54 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DFAE18E375 for ; Mon, 27 Jun 2016 07:20:52 +0000 (UTC) Date: Mon, 27 Jun 2016 12:50:50 +0530 From: Amit Shah Message-ID: <20160627072050.GD1389@grmbl.mre> References: <1466433206-29241-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1466433206-29241-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] scsi: esp: fix migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, "Dr. David Alan Gilbert" , Juan Quintela 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. So we'll have to bump this field up too. I tried that, and this is how the checker fails with minimum_version_id bumped: Section "esp" Description "esp": minimum version error: 3 < 4 Section "esp", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest Section "dc390" Description "esp": minimum version error: 3 < 4 Section "dc390", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest Section "am53c974" Description "esp": minimum version error: 3 < 4 Section "am53c974", Description "esp": expected field "cmdlen", got "cmdbuf"; skipping rest We're at a point where we can't accept an older migration stream for this device, right? At least that's what the version bump indicates. One workaround would be to mark the current cmdbuf as unused, and push the new one into a subsection. That way we can keep incoming migrations working, but given esp migrations never worked with the partial state earlier, we'd not be any worse-off. Amit