diff options
author | David Howells <dhowells@redhat.com> | 2023-09-22 13:25:22 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2023-12-28 09:45:18 +0000 |
commit | 7d828a06634799aba0fa392913c7fe2953eb64a6 (patch) | |
tree | 5fa6cc75c11007bf13f9178b0602dad3480d9948 /fs/netfs/internal.h | |
parent | 21d706d5cf570917594b21edee81893bdce09ab8 (diff) |
netfs: Provide tools to create a buffer in an xarray
Provide tools to create a buffer in an xarray, with a function to add new
folios with a mark. This will be used to create bounce buffer and can be
used more easily to create a list of folios the span of which would require
more than a page's worth of bio_vec structs.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Diffstat (limited to 'fs/netfs/internal.h')
-rw-r--r-- | fs/netfs/internal.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/netfs/internal.h b/fs/netfs/internal.h index 4708fb15446b..b908c7e0a901 100644 --- a/fs/netfs/internal.h +++ b/fs/netfs/internal.h @@ -57,6 +57,19 @@ static inline void netfs_proc_del_rreq(struct netfs_io_request *rreq) {} #endif /* + * misc.c + */ +#define NETFS_FLAG_PUT_MARK BIT(0) +#define NETFS_FLAG_PAGECACHE_MARK BIT(1) +int netfs_xa_store_and_mark(struct xarray *xa, unsigned long index, + struct folio *folio, unsigned int flags, + gfp_t gfp_mask); +int netfs_add_folios_to_buffer(struct xarray *buffer, + struct address_space *mapping, + pgoff_t index, pgoff_t to, gfp_t gfp_mask); +void netfs_clear_buffer(struct xarray *buffer); + +/* * objects.c */ struct netfs_io_request *netfs_alloc_request(struct address_space *mapping, |