]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: add new mount option to enable sparse reads
authorJeff Layton <jlayton@kernel.org>
Sat, 26 Feb 2022 11:33:03 +0000 (06:33 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 15 Aug 2022 12:51:41 +0000 (14:51 +0200)
commit0637c29d3f4a9ae774e3d345141ef4e91c8b14c2
treed3132168d072bba5793c8ad11359069feabad2e3
parent7d3c9288bf3dbdc8096afa1747907e04036f9c8f
ceph: add new mount option to enable sparse reads

Add a new mount option that has the client issue sparse reads instead of
normal ones. The callers now preallocate an sparse extent buffer that
the libceph receive code can populate and hand back after the operation
completes.

After a successful sparse read, we can't use the req->r_result value to
determine the amount of data "read", so instead we set the received
length to be from the end of the last extent in the buffer. Any
interstitial holes will have been filled by the receive code.

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
fs/ceph/addr.c
fs/ceph/file.c
fs/ceph/super.c
fs/ceph/super.h