From e885e84f796da2433907e57358bc4916bca30a50 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Thu, 27 Oct 2016 21:38:42 -0700 Subject: Add max_read to fuse_conn_info Eventually, this setting should be negotiated in the filesystem's init() handler (like e.g. max_write). However, this requires corresponding changes in the FUSE kernel module. In preparation for this (and to allow a transition period) we already allow (and require) filesystems to set the value in the init() handler in addition to the mount option. The end-goal is tracked in issue #91. --- include/fuse_common.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/fuse_common.h') diff --git a/include/fuse_common.h b/include/fuse_common.h index c3636b8..5840956 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -221,6 +221,20 @@ struct fuse_conn_info { */ unsigned max_write; + /** + * Maximum size of read requests. A value of zero indicates no + * limit. However, even if the filesystem does not specify a + * limit, the maximum size of read requests will still be + * limited by the kernel. + * + * NOTE: For the time being, the maximum size of read requests + * must be set both here *and* passed to fuse_session_new() + * using the ``-o max_read=`` mount option. At some point + * in the future, specifying the mount option will no longer + * be necessary. + */ + unsigned max_read; + /** * Maximum readahead */ -- cgit v1.2.3