summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/src/fuse-helpers.c
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2018-01-09 15:11:00 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-04-02 06:10:30 +0000
commit08fadcc2a706342e4eee79dc7d9b48ba01fcb312 (patch)
tree64759c0d2701a80ca0aa5270a44018389306f2bb /xlators/mount/fuse/src/fuse-helpers.c
parent25690197a6af67669346892c36cca471805b9305 (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-helpers.c')
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c
index c59ff772cb8..c2d4d0cc9d8 100644
--- a/xlators/mount/fuse/src/fuse-helpers.c
+++ b/xlators/mount/fuse/src/fuse-helpers.c
@@ -123,6 +123,9 @@ get_fuse_state (xlator_t *this, fuse_in_header_t *finh)
pthread_mutex_lock (&priv->sync_mutex);
{
+ while (priv->handle_graph_switch)
+ pthread_cond_wait (&priv->migrate_cond,
+ &priv->sync_mutex);
active_subvol = fuse_active_subvol (state->this);
active_subvol->winds++;
}