Received: from eggs.gnu.org ([2001:4830:134:3::10]:51769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejxbp-0003BU-Rd for qemu-devel@nongnu.org; Thu, 08 Feb 2018 20:36:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejxbm-0004Uv-O1 for qemu-devel@nongnu.org; Thu, 08 Feb 2018 20:36:13 -0500 Received: from m15-111.126.com ([220.181.15.111]:49657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejxbl-0004Rl-UJ for qemu-devel@nongnu.org; Thu, 08 Feb 2018 20:36:10 -0500 From: Chen Hanxiao Date: Fri, 9 Feb 2018 09:35:42 +0800 Message-Id: <20180209013542.24516-1-chen_han_xiao@126.com> Subject: [Qemu-devel] [Resend][PATCH] qga: unset frozen state if no mount points are frozen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mdroth@linux.vnet.ibm.com Cc: qemu-devel@nongnu.org, Chen Hanxiao From: Chen Hanxiao If we set mountpoints to qmp_guest_fsfreeze_freeze_list, we may got nothing to freeze as all mountpoints are not valid. Call ga_unset_frozen in this senario. Cc: Michael Roth Signed-off-by: Chen Hanxiao --- Rebase on master qga/commands-posix.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index e809e382eb..9fd51f1d7a 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -1273,6 +1273,12 @@ int64_t qmp_guest_fsfreeze_freeze_list(bool has_mountpoints, } free_fs_mount_list(&mounts); + /* We may not issue any FIFREEZE here when had mountpoints. + * Just unset ga_state here and ready for the next call. + */ + if (has_mountpoints && i == 0) { + ga_unset_frozen(ga_state); + } return i; error: -- 2.14.3