Changeset
qga/commands-posix.c | 6 ++++++
1 file changed, 6 insertions(+)
Git apply log
Switched to a new branch '20180112024745.7609-1-chen_han_xiao@126.com'
Applying: qga: unset frozen state if no mount points are frozen
To https://github.com/patchew-project/qemu
 * [new tag]               patchew/20180112024745.7609-1-chen_han_xiao@126.com -> patchew/20180112024745.7609-1-chen_han_xiao@126.com
Test passed: docker

loading

Test passed: checkpatch

loading

Test passed: s390x

loading

Test passed: ppc

loading

[Qemu-devel] [resend][PATCH] qga: unset frozen state if no mount points are frozen
Posted by Chen Hanxiao, 23 weeks ago
From: Chen Hanxiao <chenhanxiao@gmail.com>

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 <mdroth@linux.vnet.ibm.com>
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
---
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