rbd: parallelize rbd ls -l
When a cluster contains a large number of images, "rbd ls -l" takes a
long time to finish. In my particular case, it took about 58s to
process 3000 images.
"rbd ls -l" opens each of image and that takes majority of time, so
improve this by using aio_open() and aio_close() to do it
asynchronously. This reduced total processing time down to around 15
seconds when using default 10 concurrently opened images.
Signed-off-by: Piotr Dałek <piotr.dalek@corp.ovh.com>
(cherry picked from commit
8f76fc861b0a628fa2269b04f77b7e31d4a7a006)