]> git-server-git.apps.pok.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)
committerJeff Layton <jlayton@kernel.org>
Tue, 31 May 2022 14:45:29 +0000 (10:45 -0400)
commit64d2fad4bee0a618e7538bb4d86b924073efee77
tree013eddedbce10a370c2efd3e283b8263041d5656
parentf17274fc0f6d390f3f61dccc8efac99da0e8010b
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