summaryrefslogtreecommitdiffstats
path: root/include/linux/netfs.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-05-27 13:45:28 +0100
committerDavid Howells <dhowells@redhat.com>2023-12-28 09:45:19 +0000
commit768ddb1eacf5dd997ecf393e7bab9796bad047e0 (patch)
tree95eca7d52ed1166adc05c97b0ecf3862d3172a43 /include/linux/netfs.h
parentcae932d3aee55035a54415dcea8e7ecf2ec469b5 (diff)
downloadlinux-768ddb1eacf5dd997ecf393e7bab9796bad047e0.tar.gz
linux-768ddb1eacf5dd997ecf393e7bab9796bad047e0.tar.bz2
linux-768ddb1eacf5dd997ecf393e7bab9796bad047e0.zip
netfs: Limit subrequest by size or number of segments
Limit a subrequest to a maximum size and/or a maximum number of contiguous physical regions. This permits, for instance, an subreq's iterator to be limited to the number of DMA'able segments that a large RDMA request can handle. 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/netfs.h b/include/linux/netfs.h
index d673d0785b9d..44cd13ad695a 100644
--- a/include/linux/netfs.h
+++ b/include/linux/netfs.h
@@ -161,6 +161,7 @@ struct netfs_io_subrequest {
refcount_t ref;
short error; /* 0 or error that occurred */
unsigned short debug_index; /* Index in list (for debugging output) */
+ unsigned int max_nr_segs; /* 0 or max number of segments in an iterator */
enum netfs_io_source source; /* Where to read from/write to */
unsigned long flags;
#define NETFS_SREQ_COPY_TO_CACHE 0 /* Set if should copy the data to the cache */