From patchwork Fri Feb 9 01:35:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Hanxiao X-Patchwork-Id: 871182 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=126.com header.i=@126.com header.b="jnEnxyeI"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zcyN729mTz9ryr for ; Fri, 9 Feb 2018 12:36:54 +1100 (AEDT) Received: from localhost ([::1]:46328 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejxcR-0003D6-Dx for incoming@patchwork.ozlabs.org; Thu, 08 Feb 2018 20:36:51 -0500 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id; bh=Z9jSH52QTSU3qluFJB A06BQkDzlrawxCTuolZHB9dJI=; b=jnEnxyeIL2p02uKmzck0i/dr2dypoJ+5bV hGmrgW5quuu9vh8FseDOEphJqTVMUOCdi7MWNaNYWFTUJ/0LxnRL7qdUYkc6bxEa jOfv+P77q3cYaelSWuzkTIEMur+d0yvgwPd75WaD1LgYcnlBk4hQf0GhNT6FgI1J KEgByo+KI= Received: from localhost.localdomain (unknown [58.213.111.46]) by smtp1 (Coremail) with SMTP id C8mowACH3nT3+nxaTLTLBw--.47896S2; Fri, 09 Feb 2018 09:36:01 +0800 (CST) From: Chen Hanxiao To: mdroth@linux.vnet.ibm.com Date: Fri, 9 Feb 2018 09:35:42 +0800 Message-Id: <20180209013542.24516-1-chen_han_xiao@126.com> X-Mailer: git-send-email 2.14.3 X-CM-TRANSID: C8mowACH3nT3+nxaTLTLBw--.47896S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrKF48Gw4kGFW8Xw4xAFWfuFg_yoWfCFb_GF yUJFZxGr4qk3W8Ja4jyr13Aw48A3y3ArnYg3sYg3W2ya4UuFZ0qan7ZrWrGr1fCa9FvFya qws5CrZ8KFySqjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU81a0PUUUUU== X-Originating-IP: [58.213.111.46] X-CM-SenderInfo: xfkh0spkdqs5xldrqiyswou0bp/1tbitQHnrlpD4z0DeQAAsA X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 220.181.15.111 Subject: [Qemu-devel] [Resend][PATCH] qga: unset frozen state if no mount points are frozen X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, Chen Hanxiao Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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: