From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2lGn-0002hA-M9 for qemu-devel@nongnu.org; Mon, 13 Jan 2014 12:25:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2lGh-0001f9-Tw for qemu-devel@nongnu.org; Mon, 13 Jan 2014 12:25:49 -0500 Received: from usindpps04.hds.com ([207.126.252.17]:59102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2lGh-0001f4-O3 for qemu-devel@nongnu.org; Mon, 13 Jan 2014 12:25:43 -0500 From: Tomoki Sekiyama Date: Mon, 13 Jan 2014 12:25:39 -0500 Message-ID: <20140113172539.11163.2952.stgit@helix> In-Reply-To: <20140113172514.11163.75410.stgit@helix> References: <20140113172514.11163.75410.stgit@helix> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 3/3] qga: vss-win32: Fix interference with snapshot deletion by other VSS request List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: ghammer@redhat.com, mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com, mitsuhiro.tanino@hds.com, rhod@redhat.com, pbonzini@redhat.com, seiji.aguchi@hds.com, areis@redhat.com 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 --- qga/vss-win32/provider.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qga/vss-win32/provider.cpp b/qga/vss-win32/provider.cpp index b233646..d5129f8 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(