This is a revised version of the sparse read code I posted a week or so ago. This work is required for fscrypt integration work, but may be useful on its own as well, and may be applicable to RBD as well. There are some significant differences from the last set: - most of the extent data that comes in little-endian is now endian-converted in-place on BE arches. - the OSD client now passes the extent map from the read back to the caller. This allows us to properly decrypt things at a higher level. It also makes it simpler for the caller to determine the actual length of the data read into the buffer - this code should allow us to support multiple sparse read operations in an OSD request. That's not been tested yet though. This has been tested with xfstests and it seems to work as expected, and seems to be on-par performance-wise with "normal" reads. Note that the messenger v2 CRC path is still the only part that has been implemented so far. We'll need to implement support for v2-secure and v1 as well before we'll want to merge any of this. We may also want to only selectively use sparse reads when necessary but they don't seem to be any slower so it may be simpler to just always use them. Jeff Layton (5): libceph: add spinlock around osd->o_requests libceph: define struct ceph_sparse_extent and add some helpers 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 | 13 +- fs/ceph/file.c | 41 ++++- fs/ceph/super.h | 7 + include/linux/ceph/messenger.h | 29 ++++ include/linux/ceph/osd_client.h | 71 ++++++++- net/ceph/messenger.c | 1 + net/ceph/messenger_v2.c | 164 ++++++++++++++++++-- net/ceph/osd_client.c | 256 +++++++++++++++++++++++++++++++- 8 files changed, 558 insertions(+), 24 deletions(-) -- 2.35.1