netfs: Change ->init_request() to return an error code
authorDavid Howells <dhowells@redhat.com>
Thu, 20 Jan 2022 21:55:46 +0000 (21:55 +0000)
committerDavid Howells <dhowells@redhat.com>
Fri, 18 Mar 2022 09:24:00 +0000 (09:24 +0000)
commit2de160417315b8d64455fe03e9bb7d3308ac3281
treefe7a61cba73b3f0e025e859c2bb7609818086da3
parent663dfb65c3b3ea4b8e1944680352992d58f3aa22
netfs: Change ->init_request() to return an error code

Change the request initialisation function to return an error code so that
the network filesystem can return a failure (ENOMEM, for example).

This will also allow ceph to abort a ->readahead() op if the server refuses
to give it a cap allowing local caching from within the netfslib framework
(errors aren't passed back through ->readahead(), so returning, say,
-ENOBUFS will cause the op to be aborted).

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com

Link: https://lore.kernel.org/r/164678212401.1200972.16537041523832944934.stgit@warthog.procyon.org.uk/
Link: https://lore.kernel.org/r/164692905398.2099075.5238033621684646524.stgit@warthog.procyon.org.uk/
fs/9p/vfs_addr.c
fs/afs/file.c
fs/netfs/objects.c
fs/netfs/read_helper.c
include/linux/netfs.h