From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTTE2-0006QR-F6 for qemu-devel@nongnu.org; Tue, 08 Oct 2013 05:05:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTTDu-000095-2g for qemu-devel@nongnu.org; Tue, 08 Oct 2013 05:05:06 -0400 Received: from mail-ee0-x231.google.com ([2a00:1450:4013:c00::231]:46483) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTTDt-00008y-SA for qemu-devel@nongnu.org; Tue, 08 Oct 2013 05:04:58 -0400 Received: by mail-ee0-f49.google.com with SMTP id d41so3734729eek.8 for ; Tue, 08 Oct 2013 02:04:57 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5253CAB5.7040708@redhat.com> Date: Tue, 08 Oct 2013 11:04:53 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <5253C514.6090103@ozlabs.ru> In-Reply-To: <5253C514.6090103@ozlabs.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] savevm/loadvm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Kevin Wolf , "qemu-devel@nongnu.org" Il 08/10/2013 10:40, Alexey Kardashevskiy ha scritto: > However qcow2_save_vmstate() sets bs->growable to 1 for a short time > (commit 178e08a58f40dd5aef2ce774fe0850f5d0e56918 from 2009) and this > triggers a branch in bdrv_co_do_writev() which changes bs->total_sectors. > So when QEMU writes snapshots to the file, the disk_size field of a > snapshot has bigger value (for example 0x4.007b.8180). I think you need to modify qcow2_save_vmstate to save and restore bs->total_sectors. Can you test that and if so post the patch? Paolo