Project

General

Profile

Feature #13025

Add scatter/gather support to librbd C/C++ APIs

Added by Jason Dillaman over 8 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Jason Dillaman
Target version:
% Done:

0%

Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

History

#1 Updated by Haomai Wang over 8 years ago

Interesting, could you show more about details? I'm also working on something related.

#2 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).

#3 Updated by Jason Dillaman over 8 years ago

  • Status changed from In Progress to Fix Under Review

#4 Updated by Josh Durgin over 8 years ago

  • Target version set to v10.0.1

#5 Updated by Jason Dillaman over 7 years ago

  • Target version changed from v10.0.1 to v11.0.0

#6 Updated by Jason Dillaman about 7 years ago

  • Target version changed from v11.0.0 to v12.0.0

#7 Updated by Jason Dillaman about 7 years ago

#8 Updated by Mykola Golub about 7 years ago

  • Status changed from Fix Under Review to Resolved

#9 Updated by Stefan Priebe almost 7 years ago

Is there any chance to get this into jewel?

#10 Updated by Jason Dillaman almost 7 years ago

@Stefan: since this is a new feature, we are not planning to backport it to older versions of Ceph.

Also available in: Atom PDF