]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
libceph: support sparse reads on msgr2 secure codepath
authorJeff Layton <jlayton@kernel.org>
Wed, 23 Mar 2022 16:17:15 +0000 (12:17 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 15 Aug 2022 12:51:41 +0000 (14:51 +0200)
commit5187cd7da37b5e0d89996d23781c5283fb5b9e54
tree538bdfba2d718df3d755676adb591e42447356f7
parent4ef3c12d04a8665dc854acc6371329f9d767641a
libceph: support sparse reads on msgr2 secure codepath

Add a new init_sgs_pages helper that populates the scatterlist from
an arbitrary point in an array of pages.

Change setup_message_sgs to take an optional pointer to an array of
pages. If that's set, then the scatterlist will be set using that
array instead of the cursor.

When given a sparse read on a secure connection, decrypt the data
in-place rather than into the final destination, by passing it the
in_enc_pages array.

After decrypting, run the sparse_read state machine in a loop, copying
data from the decrypted pages until it's complete.

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
net/ceph/messenger_v2.c