diff options
author | David Howells <dhowells@redhat.com> | 2021-08-26 09:24:42 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2022-03-18 09:24:00 +0000 |
commit | 663dfb65c3b3ea4b8e1944680352992d58f3aa22 (patch) | |
tree | 8a1b195eabea22f85dc59a42e8b700bd6c4efc65 /fs/netfs/internal.h | |
parent | 5c88705e2aeaee5521b8586e68bef47aab359914 (diff) | |
download | linux-stable-663dfb65c3b3ea4b8e1944680352992d58f3aa22.tar.gz linux-stable-663dfb65c3b3ea4b8e1944680352992d58f3aa22.tar.bz2 linux-stable-663dfb65c3b3ea4b8e1944680352992d58f3aa22.zip |
netfs: Refactor arguments for netfs_alloc_read_request
Pass start and len to the rreq allocator. This should ensure that the
fields are set so that ->init_request() can use them.
Also add a parameter to indicates the origin of the request. Ceph can use
this to tell whether to get caps.
Changes
=======
ver #3)
- Change the author to me as Jeff feels that most of the patch is my
changes now.
ver #2)
- Show the request origin in the netfs_rreq tracepoint.
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Co-developed-by: David Howells <dhowells@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: linux-cachefs@redhat.com
Link: https://lore.kernel.org/r/164622989020.3564931.17517006047854958747.stgit@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/164678208569.1200972.12153682697842916557.stgit@warthog.procyon.org.uk/ # v2
Link: https://lore.kernel.org/r/164692904155.2099075.14717645623034355995.stgit@warthog.procyon.org.uk/ # v3
Diffstat (limited to 'fs/netfs/internal.h')
-rw-r--r-- | fs/netfs/internal.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/netfs/internal.h b/fs/netfs/internal.h index a0b7d1bf9f3d..89837e904fa7 100644 --- a/fs/netfs/internal.h +++ b/fs/netfs/internal.h @@ -17,9 +17,12 @@ /* * objects.c */ -struct netfs_io_request *netfs_alloc_request(const struct netfs_request_ops *ops, +struct netfs_io_request *netfs_alloc_request(struct address_space *mapping, + struct file *file, + const struct netfs_request_ops *ops, void *netfs_priv, - struct file *file); + loff_t start, size_t len, + enum netfs_io_origin origin); void netfs_get_request(struct netfs_io_request *rreq, enum netfs_rreq_ref_trace what); void netfs_clear_subrequests(struct netfs_io_request *rreq, bool was_async); void netfs_put_request(struct netfs_io_request *rreq, bool was_async, |