aboutsummaryrefslogtreecommitdiff
path: root/qga/commands-posix.c
diff options
context:
space:
mode:
authorChen Hanxiao <chenhanxiao@gmail.com>2018-06-14 16:10:13 +0800
committerMichael Roth <mdroth@linux.vnet.ibm.com>2018-07-03 10:55:18 -0500
commit65650f0182c11a000d488a3b8e8e6ad071853f31 (patch)
tree45ba32ba8d38794215a866619a9cf99c57bb8a4e /qga/commands-posix.c
parentb07cd3e748b3f27a17c27afeee578dc4eedb8dd5 (diff)
downloadqemu-65650f0182c11a000d488a3b8e8e6ad071853f31.zip
qemu-65650f0182c11a000d488a3b8e8e6ad071853f31.tar.gz
qemu-65650f0182c11a000d488a3b8e8e6ad071853f31.tar.bz2
qga: unset frozen state if no mount points are frozen
If we set mountpoints to qmp_guest_fsfreeze_freeze_list, we may got nothing to freeze as all mountpoints are not valid. So call ga_unset_frozen in this senario. Also, if we return 0 frozen fs, there is no need to call guest-fsfreeze-thaw. Cc: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qga/commands-posix.c')
-rw-r--r--qga/commands-posix.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index eae8171..594d21e 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -1274,6 +1274,12 @@ int64_t qmp_guest_fsfreeze_freeze_list(bool has_mountpoints,
}
free_fs_mount_list(&mounts);
+ /* We may not issue any FIFREEZE here.
+ * Just unset ga_state here and ready for the next call.
+ */
+ if (i == 0) {
+ ga_unset_frozen(ga_state);
+ }
return i;
error: