summaryrefslogtreecommitdiffstats
path: root/include/linux/netfs.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2023-09-22 13:25:22 +0100
committerDavid Howells <dhowells@redhat.com>2023-12-28 09:45:18 +0000
commit7d828a06634799aba0fa392913c7fe2953eb64a6 (patch)
tree5fa6cc75c11007bf13f9178b0602dad3480d9948 /include/linux/netfs.h
parent21d706d5cf570917594b21edee81893bdce09ab8 (diff)
downloadlinux-7d828a06634799aba0fa392913c7fe2953eb64a6.tar.gz
linux-7d828a06634799aba0fa392913c7fe2953eb64a6.tar.bz2
linux-7d828a06634799aba0fa392913c7fe2953eb64a6.zip
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 'include/linux/netfs.h')
-rw-r--r--include/linux/netfs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/netfs.h b/include/linux/netfs.h
index 2bb1273b38f4..c05365e3f428 100644
--- a/include/linux/netfs.h
+++ b/include/linux/netfs.h
@@ -109,6 +109,10 @@ static inline int wait_on_page_fscache_killable(struct page *page)
return folio_wait_private_2_killable(page_folio(page));
}
+/* Marks used on xarray-based buffers */
+#define NETFS_BUF_PUT_MARK XA_MARK_0 /* - Page needs putting */
+#define NETFS_BUF_PAGECACHE_MARK XA_MARK_1 /* - Page needs wb/dirty flag wrangling */
+
enum netfs_io_source {
NETFS_FILL_WITH_ZEROES,
NETFS_DOWNLOAD_FROM_SERVER,