Skip to content

ceph: support for sparse read in msgr2 crc path

Jeff Layton ceph-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 11 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3libceph: add sparse read support to msgr2 crc state machineinclude/linux/ceph/messenger.h net/ceph/messenger.c net/ceph/messenger_v2.c+238 -91 reply
2/3libceph: add sparse read support to OSD clientinclude/linux/ceph/osd_client.h net/ceph/osd_client.c+194 -71 reply
3/3ceph: convert to sparse readsfs/ceph/addr.c fs/ceph/file.c+3 -32 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] ceph: support for sparse read in msgr2 crc path

This patchset is a revised version of the one I sent a couple of weeks ago. This adds support for sparse reads to libceph, and changes cephfs over to use instead of non-sparse reads. The sparse read codepath is a drop in replacement for regular reads, so the upper layers should be able to use it interchangeibly.

This is necessary for the (ongoing) fscrypt work. We need to know which regions in a file are actually sparse so that we can avoid decrypting them.

The next step is to add the same support to the msgr2 secure codepath. Currently that code sets up a scatterlist with the final destination data pages in it and passes that to the decrypt routine so that the decrypted data is written directly to the destination.

My thinking here is to change that to decrypt the data in-place for sparse reads, and then we'll just parse the decrypted buffer via calling sparse_read and copy the data into the right places.

Ilya, does that sound sane? Is it OK to pass gcm_crypt two different scatterlists with a region that overlaps?

Jeff Layton (3):
libceph: add sparse read support to msgr2 crc state machine
libceph: add sparse read support to OSD client
ceph: convert to sparse reads

 fs/ceph/addr.c                  |   2 +-
 fs/ceph/file.c                  |   4 +-
 include/linux/ceph/messenger.h  |  31 +++++
 include/linux/ceph/osd_client.h |  38 ++++++
 net/ceph/messenger.c            |   1 +
 net/ceph/messenger_v2.c         | 215 ++++++++++++++++++++++++++++++--
 net/ceph/osd_client.c           | 163 ++++++++++++++++++++++--
 7 files changed, 435 insertions(+), 19 deletions(-)
Signature · 1 line
2.35.1