Skip to content

libceph: add new iov_iter msg_data type and use it for reads

Jeff Layton ceph-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 3 repliesIn review
  2. v22 patches 2 repliesSuperseded
  3. v12 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- flesh out kerneldoc header over osd_req_op_extent_osd_data_pages
- remove export of ceph_msg_data_add_iter

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2libceph: add new iov_iter-based ceph_msg_data_type and ceph_osd_data_typeinclude/linux/ceph/messenger.h include/linux/ceph/osd_client.h net/ceph/messenger.c +1 more+123 -00 replies
2/2ceph: use osd_req_op_extent_osd_iter for netfs readsfs/ceph/addr.c+1 -170 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/2] libceph: add new iov_iter msg_data type and use it for reads

v3:
- flesh out kerneldoc header over osd_req_op_extent_osd_data_pages
- remove export of ceph_msg_data_add_iter

v2:
- make _next handler advance the iterator in preparation for coming changes to iov_iter_get_pages

Just a respin to address some minor nits pointed out by Xiubo.

------------------------8<-------------------------

This patchset was inspired by some earlier work that David Howells did to add a similar type.

Currently, we take an iov_iter from the netfs layer, turn that into an array of pages, and then pass that to the messenger which eventually turns that back into an iov_iter before handing it back to the socket.

This patchset adds a new ceph_msg_data_type that uses an iov_iter directly instead of requiring an array of pages or bvecs. This allows us to avoid an extra allocation in the buffered read path, and should make it easier to plumb in write helpers later.

For now, this is still just a slow, stupid implementation that hands the socket layer a page at a time like the existing messenger does. It doesn't yet attempt to pass through the iov_iter directly.

I have some patches that pass the cursor's iov_iter directly to the socket in the receive path, but it requires some infrastructure that's not in mainline yet (iov_iter_scan(), for instance). It should be possible to something similar in the send path as well.

Jeff Layton (2):
libceph: add new iov_iter-based ceph_msg_data_type and
ceph_osd_data_type
ceph: use osd_req_op_extent_osd_iter for netfs reads

 fs/ceph/addr.c                  | 18 +------
 include/linux/ceph/messenger.h  |  8 ++++
 include/linux/ceph/osd_client.h |  4 ++
 net/ceph/messenger.c            | 84 +++++++++++++++++++++++++++++++++
 net/ceph/osd_client.c           | 27 +++++++++++
 5 files changed, 124 insertions(+), 17 deletions(-)
Signature · 1 line
2.36.1