On 11/27/2009 10:43 PM, Chris Webb wrote:
During live migration, block drivers with exclusive locking behaviour [such as
Sheepdog: http://www.osrg.net/sheepdog/] are problematic, as both source and
destination need to have the device open simultaneously. However, the lock is
only required while the vm is running, and at most one vm is running at each
stage of migration. This patch introduces bdrv_claim and bdrv_release hooks
which can be used to claim and release the lock on vm start and stop, allowing
Sheepdog-backed guests to migrate.
This functionality could also be more generally useful. For example, it would
be possible to take fcntl() locks on qcow2 files, preventing corruption from
two qemu processes concurrently modifying qcow2 metadata. Doing this in
bdrv_open() is not possible as it would prevent live migration of guests
backed by qcow2 files on a shared filesystem.
We may need to discuss this patch in qemu-devel, but this is enough
useful for sheepdog to support live migration, so I'll merge it.
Thanks, Chris!
Regards,
MORITA Kazutaka
--
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog