From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZLbf-0001cC-O2 for qemu-devel@nongnu.org; Thu, 24 Oct 2013 10:09:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZLbX-00034y-60 for qemu-devel@nongnu.org; Thu, 24 Oct 2013 10:09:47 -0400 Received: from mail-we0-x231.google.com ([2a00:1450:400c:c03::231]:63111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZLbW-00034m-Vm for qemu-devel@nongnu.org; Thu, 24 Oct 2013 10:09:39 -0400 Received: by mail-we0-f177.google.com with SMTP id x55so2308086wes.8 for ; Thu, 24 Oct 2013 07:09:38 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <52692A1D.7050701@redhat.com> Date: Thu, 24 Oct 2013 15:09:33 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1382412341-1173-1-git-send-email-lilei@linux.vnet.ibm.com> <1382412341-1173-12-git-send-email-lilei@linux.vnet.ibm.com> In-Reply-To: <1382412341-1173-12-git-send-email-lilei@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 11/17] savevm: adjust ram_control_save_page for page flipping List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lei Li Cc: aarcange@redhat.com, aliguori@us.ibm.com, quintela@redhat.com, qemu-devel@nongnu.org, mrhines@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com, lagarcia@br.ibm.com, rcj@linux.vnet.ibm.com Il 22/10/2013 04:25, Lei Li ha scritto: > As callback save_page will always be opened by > qemu_fopen_socket_local(), and without unix_page_flipping > it will return RAM_SAVE_CONTROL_NOT_SUPP, it leads to a > wrong qemu_file_set_error() based on the current logic. > So this patch adds RAM_SAVE_CONTROL_NOT_SUPP to the check. > > Signed-off-by: Lei Li > --- > savevm.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/savevm.c b/savevm.c > index 56b8643..b102275 100644 > --- a/savevm.c > +++ b/savevm.c > @@ -668,7 +668,8 @@ size_t ram_control_save_page(QEMUFile *f, ram_addr_t block_offset, > int ret = f->ops->save_page(f, f->opaque, block_offset, > offset, size, bytes_sent); > > - if (ret != RAM_SAVE_CONTROL_DELAYED) { > + if (ret != RAM_SAVE_CONTROL_DELAYED && > + ret != RAM_SAVE_CONTROL_NOT_SUPP) { > if (bytes_sent && *bytes_sent > 0) { > qemu_update_position(f, *bytes_sent); > } else if (ret < 0) { > Reviewed-by: Paolo Bonzini