summaryrefslogtreecommitdiffstats
path: root/qga/vss-win32
diff options
context:
space:
mode:
authorTomoki Sekiyama2014-01-13 18:25:39 +0100
committerMichael Roth2014-02-23 20:11:52 +0100
commitd9e1f574cb6eac0a3a2f97b67d2e7a3ad9c1dc95 (patch)
treeb1e1b59079dad95151e0300bc4c5966e997b724c /qga/vss-win32
parentqga: vss-win32: Fix interference with snapshot creation by other VSS requesters (diff)
downloadqemu-d9e1f574cb6eac0a3a2f97b67d2e7a3ad9c1dc95.tar.gz
qemu-d9e1f574cb6eac0a3a2f97b67d2e7a3ad9c1dc95.tar.xz
qemu-d9e1f574cb6eac0a3a2f97b67d2e7a3ad9c1dc95.zip
qga: vss-win32: Fix interference with snapshot deletion by other VSS request
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>
Diffstat (limited to 'qga/vss-win32')
-rw-r--r--qga/vss-win32/provider.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qga/vss-win32/provider.cpp b/qga/vss-win32/provider.cpp
index b2336465ac..d5129f8f65 100644
--- a/qga/vss-win32/provider.cpp
+++ b/qga/vss-win32/provider.cpp
@@ -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(