On 01/09/2014 09:15 AM, Peter Krempa wrote:
Use the new storage conversion APIs to delete garbage left behind
after
a failed snapshot attempt using the storage driver.
---
src/qemu/qemu_driver.c | 60 ++++++++++++++++++++++++++++++++++++++------------
1 file changed, 46 insertions(+), 14 deletions(-)
cleanup:
- if (need_unlink && unlink(source))
- VIR_WARN("unable to unlink just-created %s", source);
+ if (need_unlink) {
+ if (virStorageVolDelete(temppool->vol, 0) < 0) {
YES! This is where sticking the polymorphism in the storage pool
backends, so that the front-ends call simple wrappers without knowing
whether it wraps unlink() or a complex series of gluster API calls,
proves that we are finally getting the separation of design correct.
There's probably a lot more places where we can/should make use of
ephemeral pools, but this is a step in the right direction.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org