From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yoshiaki Tamura Subject: Re: [PATCH 03/18] Introduce skip_header parameter to qemu_loadvm_state(). Date: Thu, 24 Feb 2011 11:49:54 +0900 Message-ID: <4D65C752.7030406@lab.ntt.co.jp> References: <1298468927-19193-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> <1298468927-19193-4-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kwolf@redhat.com, aliguori@us.ibm.com, dlaor@redhat.com, ananth@in.ibm.com, kvm@vger.kernel.org, mst@redhat.com, mtosatti@redhat.com, qemu-devel@nongnu.org, vatsa@linux.vnet.ibm.com, blauwirbel@gmail.com, ohmura.kei@lab.ntt.co.jp, avi@redhat.com, pbonzini@redhat.com, psuriset@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com To: quintela@redhat.com Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org List-Id: kvm.vger.kernel.org Juan Quintela wrote: > Yoshiaki Tamura wrote: >> Introduce skip_header parameter to qemu_loadvm_state() so that it can >> be called iteratively without reading the header. >> >> Signed-off-by: Yoshiaki Tamura >> --- >> migration.c | 2 +- >> savevm.c | 24 +++++++++++++----------- >> sysemu.h | 2 +- >> 3 files changed, 15 insertions(+), 13 deletions(-) >> >> diff --git a/migration.c b/migration.c >> index 302b8fe..bd51fef 100644 >> --- a/migration.c >> +++ b/migration.c >> @@ -63,7 +63,7 @@ int qemu_start_incoming_migration(const char *uri) >> >> void process_incoming_migration(QEMUFile *f) >> { >> - if (qemu_loadvm_state(f)< 0) { >> + if (qemu_loadvm_state(f, 0)< 0) { >> fprintf(stderr, "load of migration failed\n"); >> exit(0); >> } > > I think it would be better to just create a different function > > qemu_loadvm_state_internal() (better name) > > and that qemu_loadvm_state() just does the other tests and call > qemu_loadvm_state_internal? Sounds reasonable. Let me try. Yoshi > > > Later, Juan. > From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33685 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsRHL-0005nh-Nt for qemu-devel@nongnu.org; Wed, 23 Feb 2011 21:50:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsRHK-00067Q-EG for qemu-devel@nongnu.org; Wed, 23 Feb 2011 21:50:07 -0500 Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]:54782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsRHJ-00067F-Sn for qemu-devel@nongnu.org; Wed, 23 Feb 2011 21:50:06 -0500 Message-ID: <4D65C752.7030406@lab.ntt.co.jp> Date: Thu, 24 Feb 2011 11:49:54 +0900 From: Yoshiaki Tamura MIME-Version: 1.0 References: <1298468927-19193-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> <1298468927-19193-4-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 03/18] Introduce skip_header parameter to qemu_loadvm_state(). List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com Cc: kwolf@redhat.com, aliguori@us.ibm.com, dlaor@redhat.com, ananth@in.ibm.com, kvm@vger.kernel.org, mst@redhat.com, mtosatti@redhat.com, qemu-devel@nongnu.org, vatsa@linux.vnet.ibm.com, blauwirbel@gmail.com, ohmura.kei@lab.ntt.co.jp, avi@redhat.com, pbonzini@redhat.com, psuriset@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com Juan Quintela wrote: > Yoshiaki Tamura wrote: >> Introduce skip_header parameter to qemu_loadvm_state() so that it can >> be called iteratively without reading the header. >> >> Signed-off-by: Yoshiaki Tamura >> --- >> migration.c | 2 +- >> savevm.c | 24 +++++++++++++----------- >> sysemu.h | 2 +- >> 3 files changed, 15 insertions(+), 13 deletions(-) >> >> diff --git a/migration.c b/migration.c >> index 302b8fe..bd51fef 100644 >> --- a/migration.c >> +++ b/migration.c >> @@ -63,7 +63,7 @@ int qemu_start_incoming_migration(const char *uri) >> >> void process_incoming_migration(QEMUFile *f) >> { >> - if (qemu_loadvm_state(f)< 0) { >> + if (qemu_loadvm_state(f, 0)< 0) { >> fprintf(stderr, "load of migration failed\n"); >> exit(0); >> } > > I think it would be better to just create a different function > > qemu_loadvm_state_internal() (better name) > > and that qemu_loadvm_state() just does the other tests and call > qemu_loadvm_state_internal? Sounds reasonable. Let me try. Yoshi > > > Later, Juan. >