From patchwork Wed May 14 15:41:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 348876 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 71DE1140087 for ; Thu, 15 May 2014 01:45:36 +1000 (EST) Received: from localhost ([::1]:52528 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkbN8-0003dg-Ar for incoming@patchwork.ozlabs.org; Wed, 14 May 2014 11:45:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57993) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkbJo-0005sk-KI for qemu-devel@nongnu.org; Wed, 14 May 2014 11:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkbJe-000701-Mx for qemu-devel@nongnu.org; Wed, 14 May 2014 11:42:08 -0400 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:54816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkbJe-0006zt-DE for qemu-devel@nongnu.org; Wed, 14 May 2014 11:41:58 -0400 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 May 2014 16:41:57 +0100 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 14 May 2014 16:41:56 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 2289D17D8056 for ; Wed, 14 May 2014 16:43:05 +0100 (BST) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s4EFfuSw60686410 for ; Wed, 14 May 2014 15:41:56 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s4EFftof021124 for ; Wed, 14 May 2014 09:41:55 -0600 Received: from smtp.lab.toulouse-stg.fr.ibm.com (srv01.lab.toulouse-stg.fr.ibm.com [9.101.4.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s4EFft0V021110; Wed, 14 May 2014 09:41:55 -0600 Received: from bahia.local (icon-9-164-165-242.megacenter.de.ibm.com [9.164.165.242]) by smtp.lab.toulouse-stg.fr.ibm.com (Postfix) with ESMTP id 0DBDF210FF4; Wed, 14 May 2014 17:41:53 +0200 (CEST) To: Kevin Wolf , Anthony Liguori , "Michael S. Tsirkin" , Stefan Hajnoczi , Amit Shah , Paolo Bonzini From: Greg Kurz Date: Wed, 14 May 2014 17:41:53 +0200 Message-ID: <20140514154152.10746.45138.stgit@bahia.local> In-Reply-To: <20140514154130.10746.1412.stgit@bahia.local> References: <20140514154130.10746.1412.stgit@bahia.local> User-Agent: StGit/0.16 MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14051415-1948-0000-0000-000008C94EBC X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 195.75.94.110 Cc: Juan Quintela , Fam Zheng , Alexander Graf , Andreas =?utf-8?q?F=C3=A4rber?= , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH RFC 3/8] virtio-blk: migrate subsections X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Greg Kurz --- hw/block/virtio-blk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 8a568e5..5a0d224 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -600,6 +600,8 @@ static void virtio_blk_save(QEMUFile *f, void *opaque) req = req->next; } qemu_put_sbyte(f, 0); + + virtio_save_subsections(vdev, f); } static int virtio_blk_load(QEMUFile *f, void *opaque, int version_id) @@ -628,7 +630,7 @@ static int virtio_blk_load(QEMUFile *f, void *opaque, int version_id) req->elem.out_num, 0); } - return 0; + return virtio_load_subsections(vdev, f); } static void virtio_blk_resize(void *opaque)