[libvirt] [PATCHv5 5/7] qemu: Switch snapshot deletion to the new API functions

Eric Blake eblake at redhat.com
Wed Feb 12 18:55:46 UTC 2014


On 02/11/2014 09:26 AM, Peter Krempa wrote:
> Use the new storage driver APIs to delete snapshot backing files in case
> of failure instead of directly relying on "unlink". This will help us in
> the future when we will be adding network based storage without local
> representation in the host.
> ---
> 
> Notes:
>     Version 5:
>     - no change, wasn't reviewed yet

Finally getting a review :)

> 
>  src/qemu/qemu_driver.c | 32 +++++++++++++++++++++++---------
>  1 file changed, 23 insertions(+), 9 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 94844df..b94382d 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -94,6 +94,7 @@
>  #include "virstring.h"
>  #include "viraccessapicheck.h"
>  #include "viraccessapicheckqemu.h"
> +#include "libvirt_private.h"

Based on Dan's comment on patch 1, it may be sufficient to just include
storage_driver.h instead, which may affect the function names you call.
 But the conversion looks sane - instead of calling direct file system
syscalls, we now call polymorphic storage calls, and let the storage
driver manage whether it is a syscall or a gluster library call (or any
future other backends that also add in their driver).

ACK.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140212/c64c0312/attachment-0001.sig>


More information about the libvir-list mailing list