summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2023-09-22 14:25:22 +0200
committerDavid Howells <dhowells@redhat.com>2023-12-28 10:45:18 +0100
commit7d828a06634799aba0fa392913c7fe2953eb64a6 (patch)
tree5fa6cc75c11007bf13f9178b0602dad3480d9948 /include
parentnetfs: Add support for DIO buffering (diff)
downloadlinux-7d828a06634799aba0fa392913c7fe2953eb64a6.tar.xz
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')
-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,