summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2018-08-16 16:36:08 +0530
committerAmar Tumballi <amarts@redhat.com>2018-12-19 14:36:52 +0000
commit2af8fca492f3e1152177641b5e6ab9ea59ec0acd (patch)
tree65dfe1889f015c72f8dcad045bebc2a2197102d0 /libglusterfs
parente3ec41af9a9f4d906dd7b512b3f4f91a6f338f4b (diff)
posix: use synctask for janitor
With brick mux, the number of threads increases as the number of bricks increases. As an initiative to reduce the number of threads in brick mux scenario, replacing janitor thread to use synctask infra. Now close() and closedir() handle by separate janitor thread which is linked with glusterfs_ctx. Updates #475 Change-Id: I0c4aaf728125ab7264442fde59f3d08542785f73 Signed-off-by: Poornima G <pgurusid@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/glusterfs/glusterfs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs/glusterfs.h b/libglusterfs/src/glusterfs/glusterfs.h
index 325241818c0..ae137c5d334 100644
--- a/libglusterfs/src/glusterfs/glusterfs.h
+++ b/libglusterfs/src/glusterfs/glusterfs.h
@@ -716,6 +716,12 @@ struct _glusterfs_ctx {
} stats;
struct list_head volfile_list;
+
+ /* Add members to manage janitor threads for cleanup fd */
+ struct list_head janitor_fds;
+ pthread_cond_t janitor_cond;
+ pthread_mutex_t janitor_lock;
+ pthread_t janitor;
};
typedef struct _glusterfs_ctx glusterfs_ctx_t;