Project

General

Profile

Feature #14264

async rbd_open() option

Added by Wido den Hollander about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
01/06/2016
Due date:
% Done:

0%

Source:
other
Tags:
rbd,rbd_open,async
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

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.

Associated revisions

Revision 458d8e59 (diff)
Added by Mykola Golub about 3 years ago

librbd: API: async open and close

Fixes: #14264
Signed-off-by: Mykola Golub <>

History

#1 Updated by Mykola Golub about 3 years ago

Wido, are you working or planning to work on this feature? I could do it if you aren't.

#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

#4 Updated by Kefu Chai about 3 years ago

  • Status changed from New to Need Review

#5 Updated by Mykola Golub about 3 years ago

I think the status can be changed to resolved.

#6 Updated by Haomai Wang about 3 years ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF