From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYSbz-0005aj-5E for qemu-devel@nongnu.org; Mon, 21 Oct 2013 23:26:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYSbq-0004ZY-7A for qemu-devel@nongnu.org; Mon, 21 Oct 2013 23:26:27 -0400 Received: from e28smtp04.in.ibm.com ([122.248.162.4]:60230) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYSbp-0004YN-I2 for qemu-devel@nongnu.org; Mon, 21 Oct 2013 23:26:18 -0400 Received: from /spool/local by e28smtp04.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 22 Oct 2013 08:56:16 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 51E5D394004D for ; Tue, 22 Oct 2013 08:55:54 +0530 (IST) Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r9M3QCeC48496830 for ; Tue, 22 Oct 2013 08:56:12 +0530 Received: from d28av04.in.ibm.com (localhost [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r9M3QE9J023604 for ; Tue, 22 Oct 2013 08:56:14 +0530 From: Lei Li Date: Tue, 22 Oct 2013 11:25:35 +0800 Message-Id: <1382412341-1173-12-git-send-email-lilei@linux.vnet.ibm.com> In-Reply-To: <1382412341-1173-1-git-send-email-lilei@linux.vnet.ibm.com> References: <1382412341-1173-1-git-send-email-lilei@linux.vnet.ibm.com> Subject: [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: qemu-devel@nongnu.org Cc: aarcange@redhat.com, aliguori@us.ibm.com, Lei Li , quintela@redhat.com, mdroth@linux.vnet.ibm.com, mrhines@linux.vnet.ibm.com, lagarcia@br.ibm.com, pbonzini@redhat.com, rcj@linux.vnet.ibm.com 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) { -- 1.7.7.6