aboutsummaryrefslogtreecommitdiff
path: root/qga/commands-win32.c
diff options
context:
space:
mode:
authorChen Hanxiao <chenhanxiao@gmail.com>2018-08-31 14:22:50 +0800
committerMichael Roth <mdroth@linux.vnet.ibm.com>2018-10-30 16:48:49 -0500
commit0692b03ee135f6295168082199af55c6f289794d (patch)
tree25a3b4274ffd8453a955b1fbe5c4e238800556bb /qga/commands-win32.c
parentbad0227d3ac4f706673df9690b77840ed89dec40 (diff)
downloadqemu-0692b03ee135f6295168082199af55c6f289794d.zip
qemu-0692b03ee135f6295168082199af55c6f289794d.tar.gz
qemu-0692b03ee135f6295168082199af55c6f289794d.tar.bz2
qga-win: add support for qmp_guest_fsfreeze_freeze_list
This patch add support for freeze specified fs. The valid mountpoints list member are [1]: The path of a mounted folder, for example, Y:\MountX\ A drive letter, for example, D:\ A volume GUID path of the form \\?\Volume{GUID}\, where GUID identifies the volume A UNC path that specifies a remote file share, for example, \\Clusterx\Share1\ [1] https://docs.microsoft.com/en-us/windows/desktop/api/vsbackup/nf-vsbackup-ivssbackupcomponents-addtosnapshotset 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-win32.c')
-rw-r--r--qga/commands-win32.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 416343b9..347577f 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -791,6 +791,13 @@ GuestFsfreezeStatus qmp_guest_fsfreeze_status(Error **errp)
*/
int64_t qmp_guest_fsfreeze_freeze(Error **errp)
{
+ return qmp_guest_fsfreeze_freeze_list(false, NULL, errp);
+}
+
+int64_t qmp_guest_fsfreeze_freeze_list(bool has_mountpoints,
+ strList *mountpoints,
+ Error **errp)
+{
int i;
Error *local_err = NULL;
@@ -804,7 +811,7 @@ int64_t qmp_guest_fsfreeze_freeze(Error **errp)
/* cannot risk guest agent blocking itself on a write in this state */
ga_set_frozen(ga_state);
- qga_vss_fsfreeze(&i, true, &local_err);
+ qga_vss_fsfreeze(&i, true, mountpoints, &local_err);
if (local_err) {
error_propagate(errp, local_err);
goto error;
@@ -822,15 +829,6 @@ error:
return 0;
}
-int64_t qmp_guest_fsfreeze_freeze_list(bool has_mountpoints,
- strList *mountpoints,
- Error **errp)
-{
- error_setg(errp, QERR_UNSUPPORTED);
-
- return 0;
-}
-
/*
* Thaw local file systems using Volume Shadow-copy Service.
*/
@@ -843,7 +841,7 @@ int64_t qmp_guest_fsfreeze_thaw(Error **errp)
return 0;
}
- qga_vss_fsfreeze(&i, false, errp);
+ qga_vss_fsfreeze(&i, false, NULL, errp);
ga_unset_frozen(ga_state);
return i;
@@ -1660,7 +1658,6 @@ GList *ga_command_blacklist_init(GList *blacklist)
"guest-set-vcpus",
"guest-get-memory-blocks", "guest-set-memory-blocks",
"guest-get-memory-block-size",
- "guest-fsfreeze-freeze-list",
NULL};
char **p = (char **)list_unsupported;