diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2018-01-09 15:11:00 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2018-04-02 06:10:30 +0000 |
commit | 08fadcc2a706342e4eee79dc7d9b48ba01fcb312 (patch) | |
tree | 64759c0d2701a80ca0aa5270a44018389306f2bb /xlators/mount/fuse/src/fuse-bridge.h | |
parent | 25690197a6af67669346892c36cca471805b9305 (diff) |
mount/fuse: Add support for multi-threaded fuse readers
Usage: Use 'reader-thread-count=<NUM>' as command line option to
set the thread count at the time of mounting the volume.
Next task is to make these threads auto-scale based on the load,
instead of having the user remount the volume everytime to change
the thread count.
Updates #412
Change-Id: I94aa1505e5ae6a133683d473e0e4e0edd139b76b
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/src/fuse-bridge.h')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.h b/xlators/mount/fuse/src/fuse-bridge.h index 52718161c24..6cf9d2f7cf8 100644 --- a/xlators/mount/fuse/src/fuse-bridge.h +++ b/xlators/mount/fuse/src/fuse-bridge.h @@ -52,7 +52,7 @@ typedef struct fuse_in_header fuse_in_header_t; typedef void (fuse_handler_t) (xlator_t *this, fuse_in_header_t *finh, - void *msg); + void *msg, struct iobuf *iobuf); struct fuse_private { int fd; @@ -62,7 +62,8 @@ struct fuse_private { char *mount_point; struct iobuf *iobuf; - pthread_t fuse_thread; + pthread_t *fuse_thread; + uint32_t reader_thread_count; char fuse_thread_started; uint32_t direct_io_mode; @@ -143,6 +144,9 @@ struct fuse_private { /* Load the thin volfile, and connect to gfproxyd*/ gf_boolean_t thin_client; + gf_boolean_t mount_finished; + gf_boolean_t handle_graph_switch; + pthread_cond_t migrate_cond; }; typedef struct fuse_private fuse_private_t; @@ -394,6 +398,7 @@ typedef struct { int32_t fd_no; gf_seek_what_t whence; + struct iobuf *iobuf; } fuse_state_t; typedef struct { |