async rbd_open() option
Image this use-case (pseudo code):
for name in rbd_list():
image = rbd_open(name)
info = rbd_stat(image)
With thousands of images this will take a lot of time. This is what currently happens inside libvirt.
Refreshing a RBD storage pool can take 5 minutes when there are thousands of images in the pool.
A async option with a callback would be useful for librbd. In the callback you can then call rbd_stat() and update libvirt's metadata.
I think this is a useful option any way if you want to scan a lot of RBD images in a cluster in a efficient way.
#2 Updated by Wido den Hollander about 3 years ago
Mykola Golub wrote:
Wido, are you working or planning to work on this feature? I could do it if you aren't.
No, I'm not working on this. My librbd knowledge is way to limited I think.
I just wanted to get this recorded since I could really use it for libvirt: https://github.com/libvirt/libvirt/blob/master/src/storage/storage_backend_rbd.c#L333