computing-offload/generic_vdpa/qemu/qga-win-vss-requester_freeze-changes.patch
jiangdongxu 79c4324644 add generic_vdpa basecode
Change-Id: I2d302dda68298877c65c99147f5bf22186a59aac
2024-09-19 17:19:46 +08:00

42 lines
1.5 KiB
Diff

From 977331440154d500d434258c61eb3542e01dea38 Mon Sep 17 00:00:00 2001
From: jipengfei <jipengfei_yewu@cmss.chinamobile.com>
Date: Tue, 4 Apr 2023 18:36:27 +0800
Subject: [PATCH] qga/win/vss: requester_freeze changes
Change requester_freeze so that the VSS backup type queried from the registry
cheery-pick from 0961f929c66ceb5e9e95756bfe418b9ef34510eb
Signed-off-by: jipengfei_yewu <jipengfei_yewu@cmss.chinamobile.com>
Signed-off-by: Kfir Manor <kfir@daynix.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
---
qga/vss-win32/requester.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
index 940a2c8f55..418b9b6e4e 100644
--- a/qga/vss-win32/requester.cpp
+++ b/qga/vss-win32/requester.cpp
@@ -248,6 +248,7 @@ void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset)
int num_fixed_drives = 0, i;
int num_mount_points = 0;
+ VSS_BACKUP_TYPE vss_bt = get_vss_backup_type();
if (vss_ctx.pVssbc) { /* already frozen */
*num_vols = 0;
return;
@@ -294,7 +295,7 @@ void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset)
goto out;
}
- hr = vss_ctx.pVssbc->SetBackupState(true, true, VSS_BT_FULL, false);
+ hr = vss_ctx.pVssbc->SetBackupState(true, true, vss_bt, false);
if (FAILED(hr)) {
err_set(errset, hr, "failed to set backup state");
goto out;
--
2.27.0