Feature #13025
closedAdd scatter/gather support to librbd C/C++ APIs
0%
Updated by Haomai Wang over 8 years ago
Interesting, could you show more about details? I'm also working on something related.
Updated by Jason Dillaman over 8 years ago
Adding new methods to the C API:
rbd_aio_writev(rbd_image_t image, const struct iovec *iov, int iovcnt, uint64_t off, rbd_completion_t c) rbd_aio_readv(rbd_image_t image, const struct iovec *iov, int iovcnt, uint64_t off, rbd_completion_t c)
Internally, all the C API write methods will use a bufferlist created with a static pointer initialized to the provided buffer. From QEMU, this will eliminate the need for the bounce buffer and avoids copying the buffer into a new bufferlist (within librbd::aio_write in internal.cc). A C API write should only involve one copy to store the provided buffer in the cache (if enabled) and a read should only involve one copy to transfer data into the user buffer.
The C++ API already has basic support for scatter/gather via the bufferlist, so the only change I made there was to ensure it was no longer converting the bufferlist to a C-style array. A C++ API read/write should involve zero copies (assuming it's shareable).
Updated by Jason Dillaman over 8 years ago
- Status changed from In Progress to Fix Under Review
Updated by Jason Dillaman over 7 years ago
- Target version changed from v10.0.1 to v11.0.0
Updated by Jason Dillaman about 7 years ago
- Target version changed from v11.0.0 to v12.0.0
Updated by Jason Dillaman about 7 years ago
Updated by Mykola Golub about 7 years ago
- Status changed from Fix Under Review to Resolved
Updated by Stefan Priebe about 7 years ago
Is there any chance to get this into jewel?
Updated by Jason Dillaman about 7 years ago
@Stefan Kleijkers: since this is a new feature, we are not planning to backport it to older versions of Ceph.