[libvirt] Downloading and wiping assumes volume is a device or file

Wido den Hollander wido at widodh.nl
Thu Feb 9 20:04:48 UTC 2012


I'm still working on the RBD (RADOS / Ceph) storage driver for libvirt 
and I noticed the virStorageVolDownload and virStorageVolWipe methods.

I assumed those would be passed on to the storage backend, but it doesn't.

In the storageDriver the method storageVolumeDownload simply opens a 
file descriptor and reads the device.

Until now libvirt only had support for storage drivers who presented 
regular files or block devices, but RBD doesn't. (Well, RBD could, but 
I'm currently going for Qemu-RBD).

In the future we might see more storage drivers in libvirt for a project 
like Sheepdog as well.

Sheepdog and RBD both have drivers in Qemu.

What would the way be to approach this? Should the download, upload and 
wipe methods be moved to the storage backends?

There could also be an exception? If virStoragePoolType matches 
could be invoked instead of opening the file descriptor?

Any thoughts on this?



More information about the libvir-list mailing list