]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qga: vss-win32: Fix interference with snapshot deletion by other VSS request
authorTomoki Sekiyama <tomoki.sekiyama@hds.com>
Mon, 13 Jan 2014 17:25:39 +0000 (12:25 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Sun, 23 Feb 2014 19:11:52 +0000 (13:11 -0600)
When a VSS requester such as vshadow.exe or diskshadow.exe requests to
delete snapshots, qemu-ga VSS provider's DeleteSnapshots() is also called
and returns E_NOTIMPL, that makes the deletion fail.
To avoid this issue, return S_OK and set values that represent no snapshots
are deleted by qemu-ga VSS provider.

Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
Reviewed-by: Gal Hammer <ghammer@redhat.com>
Reviewed-by: Yan Vugenfirer <yvugenfi@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga/vss-win32/provider.cpp

index b2336465ac0b9582510a31088edca31ba1c51d2a..d5129f8f65883ed8b6d7fccf5028d1f118a55c40 100644 (file)
@@ -278,7 +278,9 @@ STDMETHODIMP CQGAVssProvider::DeleteSnapshots(
     VSS_ID SourceObjectId, VSS_OBJECT_TYPE eSourceObjectType,
     BOOL bForceDelete, LONG *plDeletedSnapshots, VSS_ID *pNondeletedSnapshotID)
 {
-    return E_NOTIMPL;
+    *plDeletedSnapshots = 0;
+    *pNondeletedSnapshotID = SourceObjectId;
+    return S_OK;
 }
 
 STDMETHODIMP CQGAVssProvider::BeginPrepareSnapshot(