]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: add new mount option to enable sparse reads wip-sparseread
authorJeff Layton <jlayton@kernel.org>
Sat, 26 Feb 2022 11:33:03 +0000 (06:33 -0500)
committerJeff Layton <jlayton@kernel.org>
Tue, 26 Apr 2022 12:54:04 +0000 (08:54 -0400)
commit6d09b9484bdee241ee77f76afca4dbf27b6c9b64
tree77ccdd068c2a266b346f0668240281d8e84f61f8
parent26b8b8c02b577c63974a6d06b943969ca2e81630
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