From patchwork Fri Feb 15 17:46:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 220793 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id ACAE12C0080 for ; Sat, 16 Feb 2013 05:01:27 +1100 (EST) Received: from localhost ([::1]:37795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6PbB-0005yS-Op for incoming@patchwork.ozlabs.org; Fri, 15 Feb 2013 13:01:25 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6POW-0006jH-Be for qemu-devel@nongnu.org; Fri, 15 Feb 2013 12:48:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6POK-0004Lx-Mx for qemu-devel@nongnu.org; Fri, 15 Feb 2013 12:48:20 -0500 Received: from mail-vb0-f50.google.com ([209.85.212.50]:35012) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6POK-0004L2-Aj for qemu-devel@nongnu.org; Fri, 15 Feb 2013 12:48:08 -0500 Received: by mail-vb0-f50.google.com with SMTP id ft2so2274569vbb.37 for ; Fri, 15 Feb 2013 09:48:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=8Hpsh+KGLMy7UN8hrbPlDFbEwNfAX0+/q9crG8gTfZM=; b=qNcOHjb4H9K2BpD+wFVfQ9/YGdH1akHSaY0AQORp88gBHosifBlc1hrTHWQLHVd6PO 7g+lh7r2oN3dLpusANHpjfhIcROMII3+81AiPW6RivM1LzBDtrdu+fTPk2iMdzbqVbaG Nt3qpJ4Jm35gJK6pkPJIvj11qsC0SX9z9J7dHN1K/H6QxFXHlvGNopjxuQnW9aQkkMw+ NE2h4+Y81y/hMjWphjPFAMHE4tfItMUQG/HikA1KTGIJu3ltWyPlKa+QeriNwmWEdDLN JkT14UlXRj3BW9kCCxl8e/Ba5CxETBtluJtmlIdUiPlpsz0ZdBH2Ls+qeuXp8yeI6M+g 7Q9Q== X-Received: by 10.220.149.198 with SMTP id u6mr4255920vcv.52.1360950483989; Fri, 15 Feb 2013 09:48:03 -0800 (PST) Received: from yakj.usersys.redhat.com (93-34-179-137.ip50.fastwebnet.it. [93.34.179.137]) by mx.google.com with ESMTPS id yu12sm65402142vec.6.2013.02.15.09.48.02 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 15 Feb 2013 09:48:03 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 15 Feb 2013 18:46:51 +0100 Message-Id: <1360950433-17106-20-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1360950433-17106-1-git-send-email-pbonzini@redhat.com> References: <1360950433-17106-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.212.50 Cc: owasserm@redhat.com, chegu_vinod@hp.com, quintela@redhat.com Subject: [Qemu-devel] [PATCH 19/41] migration: reorder SaveVMHandlers members 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 This groups together the callbacks that later will have similar locking rules. Signed-off-by: Paolo Bonzini Reviewed-by: Orit Wasserman Reviewed-by: Juan Quintela --- include/migration/vmstate.h | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index f27276c..6229569 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -32,13 +32,15 @@ typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id); typedef struct SaveVMHandlers { void (*set_params)(const MigrationParams *params, void * opaque); SaveStateHandler *save_state; + int (*save_live_setup)(QEMUFile *f, void *opaque); - int (*save_live_iterate)(QEMUFile *f, void *opaque); + void (*cancel)(void *opaque); int (*save_live_complete)(QEMUFile *f, void *opaque); + bool (*is_active)(void *opaque); + int (*save_live_iterate)(QEMUFile *f, void *opaque); uint64_t (*save_live_pending)(QEMUFile *f, void *opaque, uint64_t max_size); - void (*cancel)(void *opaque); + LoadStateHandler *load_state; - bool (*is_active)(void *opaque); } SaveVMHandlers; int register_savevm(DeviceState *dev,