summaryrefslogtreecommitdiffstats
path: root/fs/fuse/fuse_i.h
diff options
context:
space:
mode:
authorCsaba Henk <csaba@gluster.com>2009-07-01 17:28:41 -0700
committerMiklos Szeredi <mszeredi@suse.cz>2009-07-07 17:28:52 +0200
commit7a6d3c8b3049d07123628f2bf57127bba2cc878f (patch)
treebfa09bd7e87753eb777699e0566e396ae639532c /fs/fuse/fuse_i.h
parent8e4a718ff38d8539938ec3421935904c27e00c39 (diff)
downloadop-kernel-dev-7a6d3c8b3049d07123628f2bf57127bba2cc878f.zip
op-kernel-dev-7a6d3c8b3049d07123628f2bf57127bba2cc878f.tar.gz
fuse: make the number of max background requests and congestion threshold tunable
The practical values for these limits depend on the design of the filesystem server so let userspace set them at initialization time. Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r--fs/fuse/fuse_i.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 52b641f..6bcfab0 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -25,12 +25,6 @@
/** Max number of pages that can be used in a single read request */
#define FUSE_MAX_PAGES_PER_REQ 32
-/** Maximum number of outstanding background requests */
-#define FUSE_MAX_BACKGROUND 12
-
-/** Congestion starts at 75% of maximum */
-#define FUSE_CONGESTION_THRESHOLD (FUSE_MAX_BACKGROUND * 75 / 100)
-
/** Bias for fi->writectr, meaning new writepages must not be sent */
#define FUSE_NOWRITE INT_MIN
@@ -349,6 +343,12 @@ struct fuse_conn {
/** rbtree of fuse_files waiting for poll events indexed by ph */
struct rb_root polled_files;
+ /** Maximum number of outstanding background requests */
+ unsigned max_background;
+
+ /** Number of background requests at which congestion starts */
+ unsigned congestion_threshold;
+
/** Number of requests currently in the background */
unsigned num_background;
OpenPOWER on IntegriCloud