ceph: Make ceph_init_request() check caps on readahead
authorDavid Howells <dhowells@redhat.com>
Wed, 9 Mar 2022 21:45:22 +0000 (21:45 +0000)
committerDavid Howells <dhowells@redhat.com>
Fri, 18 Mar 2022 09:27:13 +0000 (09:27 +0000)
commita5c9dc4451394b2854493944dcc0ff71af9705a3
tree1885b0868a5b396bd95af13a3304084a2eea7408
parent2de160417315b8d64455fe03e9bb7d3308ac3281
ceph: Make ceph_init_request() check caps on readahead

Move the caps check from ceph_readahead() to ceph_init_request(),
conditional on the origin being NETFS_READAHEAD so that in a future patch,
ceph can point its ->readahead() vector directly at netfs_readahead().

Changes
=======
ver #4)
 - Move the check for NETFS_READAHEAD up in ceph_init_request()[2].

ver #3)
 - Split from the patch to add a netfs inode context[1].
 - Need to store the caps got in rreq->netfs_priv for later freeing.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: ceph-devel@vger.kernel.org
cc: linux-cachefs@redhat.com

Link: https://lore.kernel.org/r/8af0d47f17d89c06bbf602496dd845f2b0bf25b3.camel@kernel.org/
Link: https://lore.kernel.org/r/dd054c962818716e718bd9b446ee5322ca097675.camel@redhat.com/
Link: https://lore.kernel.org/r/164692907694.2099075.10081819855690054094.stgit@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/2533821.1647006574@warthog.procyon.org.uk/
fs/ceph/addr.c