summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/fuse-include/fuse_kernel.h10
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c12
2 files changed, 17 insertions, 5 deletions
diff --git a/contrib/fuse-include/fuse_kernel.h b/contrib/fuse-include/fuse_kernel.h
index dac35d8b9..9ae25d6f9 100644
--- a/contrib/fuse-include/fuse_kernel.h
+++ b/contrib/fuse-include/fuse_kernel.h
@@ -56,6 +56,10 @@
* - add umask flag to input argument of open, mknod and mkdir
* - add notification messages for invalidation of inodes and
* directory entries
+ *
+ * 7.13
+ * - make max number of background requests and congestion threshold
+ * tunables
*/
#ifndef _LINUX_FUSE_H
@@ -66,12 +70,13 @@
#define __s64 int64_t
#define __u32 uint32_t
#define __s32 int32_t
+#define __u16 uint16_t
/** Version number of this interface */
#define FUSE_KERNEL_VERSION 7
/** Minor version number of this interface */
-#define FUSE_KERNEL_MINOR_VERSION 12
+#define FUSE_KERNEL_MINOR_VERSION 13
/** The node ID of the root inode */
#define FUSE_ROOT_ID 1
@@ -457,7 +462,8 @@ struct fuse_init_out {
__u32 minor;
__u32 max_readahead;
__u32 flags;
- __u32 unused;
+ __u16 max_background;
+ __u16 congestion_threshold;
__u32 max_write;
};
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 714ca995d..a17c8e53c 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -62,7 +62,7 @@
#define ZR_DIRECT_IO_OPT "direct-io-mode"
#define ZR_STRICT_VOLFILE_CHECK "strict-volfile-check"
-#define FUSE_712_OP_HIGH (FUSE_POLL + 1)
+#define FUSE_713_OP_HIGH (FUSE_POLL + 1)
#define GLUSTERFS_XATTR_LEN_MAX 65536
#define MAX_FUSE_PROC_DELAY 1
@@ -2914,6 +2914,12 @@ fuse_init (xlator_t *this, fuse_in_header_t *finh, void *msg)
priv->direct_io_mode = 0;
fino.flags |= FUSE_BIG_WRITES;
}
+ if (fini->minor >= 13) {
+ /* these values seemed to work fine during testing */
+
+ fino.max_background = 64;
+ fino.congestion_threshold = 48;
+ }
if (fini->minor < 9)
*priv->msg0_len_p = sizeof(*finh) + FUSE_COMPAT_WRITE_IN_SIZE;
@@ -2951,7 +2957,7 @@ fuse_discard (xlator_t *this, fuse_in_header_t *finh, void *msg)
FREE (finh);
}
-static fuse_handler_t *fuse_ops[FUSE_712_OP_HIGH];
+static fuse_handler_t *fuse_ops[FUSE_713_OP_HIGH];
int
fuse_first_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
@@ -3443,7 +3449,7 @@ init (xlator_t *this_xl)
pthread_mutex_init (&priv->child_up_mutex, NULL);
priv->child_up_value = 1;
- for (i = 0; i < FUSE_712_OP_HIGH; i++)
+ for (i = 0; i < FUSE_713_OP_HIGH; i++)
fuse_ops[i] = fuse_enosys;
fuse_ops[FUSE_INIT] = fuse_init;
fuse_ops[FUSE_DESTROY] = fuse_discard;