Skip to contentSkip to conversation

qga: unset frozen state if no mount points are frozen

PATCH RESEND Superseded Chen Hanxiao 1 participant 1 message Jan 12, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 qga: unset frozen state if no mount points are frozen

From: Chen Hanxiao <[email protected]>

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.

---
Rebase on master

 qga/commands-posix.c | 6 ++++++
 1 file changed, 6 insertions(+)
qga/commands-posix.c +6 -0
index e809e382eb..9fd51f1d7a 100644
@@ -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:
Signature · 1 line
2.14.3