Project

General

Profile

Feature #13025

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

Added by Jason Dillaman about 2 years ago. Updated 7 months ago.

Status:
Resolved
Priority:
Normal
Target version:
Start date:
09/10/2015
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
Reviewed:
User Impact:
Affected Versions:
Release:
Needs Doc:
No

History

#1 Updated by Haomai Wang about 2 years ago

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

#2 Updated by Jason Dillaman about 2 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 about 2 years ago

  • Status changed from In Progress to Need Review

#4 Updated by Josh Durgin about 2 years ago

  • Target version set to v10.0.1

#5 Updated by Jason Dillaman over 1 year ago

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

#6 Updated by Jason Dillaman 9 months ago

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

#8 Updated by Mykola Golub 9 months ago

  • Status changed from Need Review to Resolved

#9 Updated by Stefan Priebe 7 months ago

Is there any chance to get this into jewel?

#10 Updated by Jason Dillaman 7 months 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