]> git.ipfire.org Git - thirdparty/qemu.git/commit
qga: vss-win32: Fix interference with snapshot creation by other VSS requesters
authorTomoki Sekiyama <tomoki.sekiyama@hds.com>
Mon, 13 Jan 2014 17:25:29 +0000 (12:25 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 25 Feb 2014 19:33:54 +0000 (13:33 -0600)
commit5e5d4fc68e1e0bcc29ab2354f32c37a754fd9192
tree69fff72b7ba904eede63bd8f87cba2c17124cf96
parent68e3bb1128f792407550f47de444f5814e8d18a8
qga: vss-win32: Fix interference with snapshot creation by other VSS requesters

When a VSS requester such as vshadow.exe or diskshadow.exe requests to
create disk snapshots, Windows may choose qemu-ga VSS provider if it is
only provider registered on the system. However, because it provides only a
function to freeze the filesystem, the snapshotting fails.

This patch adds a check into CQGAVssProvider::IsVolumeSupported() to reject
the request from other VSS requesters, so that the other provider is chosen.

The check of requester is done by confirming event channels between
qemu-ga's requester and provider established. To ensure that the events are
initialized when CQGAVssProvider::IsVolumeSupported() is called, it moves
the initialization earlier.

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>
(cherry picked from commit ff8adbcfdbbd9c0f2b01ff8a32bc75082fdd9844)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga/vss-win32/provider.cpp
qga/vss-win32/requester.cpp