This is a first stab at a patchset to add support for sparse reads to libceph. This is a prerequisite for fscrypt support, since we need to be able to know whether a region is sparse in order to know whether we need to decrypt it. The patches basically work at this point, but it's still a RFC for a few reasons: 1) the ms_mode=secure and ms_mode=legacy codepaths are not yet supported. "legacy" doesn't look too bad, but "secure" is a bit tougher, as I'd like to avoid extra buffering. 2) the OSD currently throws back -EINVAL on a sparse read if an extent has a non-zero truncate_seq. I've opened this bug to request that this be remedied: https://tracker.ceph.com/issues/54280 3) I'm not sure I got the revoke_at_* patch correct. I added a new field to the v2_info structure. Maybe there is some better way to handle that? What's the best way to test the revocation codepaths? I ran this through xfstests yesterday, and several of them failed because of #2 above, but it didn't oops! Jeff Layton (5): libceph: allow ceph_msg_data_advance to advance more than a page libceph: add sparse read support to msgr2 crc state machine libceph: add sparse read support to OSD client libceph: add revoke support for sparse data ceph: switch to sparse reads fs/ceph/addr.c | 2 +- fs/ceph/file.c | 4 +- include/linux/ceph/messenger.h | 20 ++++ include/linux/ceph/osd_client.h | 37 ++++++ net/ceph/messenger.c | 12 +- net/ceph/messenger_v2.c | 195 +++++++++++++++++++++++++++++--- net/ceph/osd_client.c | 161 +++++++++++++++++++++++++- 7 files changed, 408 insertions(+), 23 deletions(-) -- 2.34.1