d2787b
From 17a9ce965ef2fec9ee5c8e4b76981bb7cbcf1352 Mon Sep 17 00:00:00 2001
d2787b
From: mohit84 <moagrawa@redhat.com>
d2787b
Date: Mon, 9 Nov 2020 17:15:42 +0530
d2787b
Subject: [PATCH 506/511] posix: Attach a posix_spawn_disk_thread with
d2787b
 glusterfs_ctx (#1595)
d2787b
d2787b
Currently posix xlator spawns posix_disk_space_threads per brick and in
d2787b
case of brick_mux environment while glusterd attached bricks at maximum
d2787b
level(250) with a single brick process in that case 250 threads are
d2787b
spawned for all bricks and brick process memory size also increased.
d2787b
d2787b
Solution: Attach a posix_disk_space thread with glusterfs_ctx to
d2787b
          spawn a thread per process basis instead of spawning a per brick
d2787b
d2787b
> Fixes: #1482
d2787b
> Change-Id: I8dd88f252a950495b71742e2a7588bd5bb019ec7
d2787b
> Cherry-picked from commit 3f93be77e1acf5baacafa97a320e91e6879d1c0e
d2787b
> Reviewed on upstream link https://github.com/gluster/glusterfs/issues/1482
d2787b
> Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
d2787b
d2787b
Change-Id: I8dd88f252a950495b71742e2a7588bd5bb019ec7
d2787b
Bug: 1898776
d2787b
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
d2787b
Reviewed-on: https://code.engineering.redhat.com/gerrit/220366
d2787b
Tested-by: RHGS Build Bot <nigelb@redhat.com>
d2787b
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
d2787b
---
d2787b
 glusterfsd/src/glusterfsd.c                    |   4 +
d2787b
 libglusterfs/src/glusterfs/glusterfs.h         |   6 ++
d2787b
 xlators/storage/posix/src/posix-common.c       |  68 +++++++++++--
d2787b
 xlators/storage/posix/src/posix-handle.h       |   3 +-
d2787b
 xlators/storage/posix/src/posix-helpers.c      | 131 ++++++++++++++-----------
d2787b
 xlators/storage/posix/src/posix-inode-fd-ops.c |   3 +-
d2787b
 xlators/storage/posix/src/posix-mem-types.h    |   1 +
d2787b
 xlators/storage/posix/src/posix.h              |  12 ++-
d2787b
 8 files changed, 160 insertions(+), 68 deletions(-)
d2787b
d2787b
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
d2787b
index 955bf1d..ac25255 100644
d2787b
--- a/glusterfsd/src/glusterfsd.c
d2787b
+++ b/glusterfsd/src/glusterfsd.c
d2787b
@@ -1840,9 +1840,13 @@ glusterfs_ctx_defaults_init(glusterfs_ctx_t *ctx)
d2787b
     INIT_LIST_HEAD(&cmd_args->xlator_options);
d2787b
     INIT_LIST_HEAD(&cmd_args->volfile_servers);
d2787b
     ctx->pxl_count = 0;
d2787b
+    ctx->diskxl_count = 0;
d2787b
     pthread_mutex_init(&ctx->fd_lock, NULL);
d2787b
     pthread_cond_init(&ctx->fd_cond, NULL);
d2787b
     INIT_LIST_HEAD(&ctx->janitor_fds);
d2787b
+    pthread_mutex_init(&ctx->xl_lock, NULL);
d2787b
+    pthread_cond_init(&ctx->xl_cond, NULL);
d2787b
+    INIT_LIST_HEAD(&ctx->diskth_xl);
d2787b
 
d2787b
     lim.rlim_cur = RLIM_INFINITY;
d2787b
     lim.rlim_max = RLIM_INFINITY;
d2787b
diff --git a/libglusterfs/src/glusterfs/glusterfs.h b/libglusterfs/src/glusterfs/glusterfs.h
d2787b
index bf6a987..d3400bf 100644
d2787b
--- a/libglusterfs/src/glusterfs/glusterfs.h
d2787b
+++ b/libglusterfs/src/glusterfs/glusterfs.h
d2787b
@@ -740,7 +740,13 @@ struct _glusterfs_ctx {
d2787b
     pthread_t janitor;
d2787b
     /* The variable is use to save total posix xlator count */
d2787b
     uint32_t pxl_count;
d2787b
+    uint32_t diskxl_count;
d2787b
 
d2787b
+    /* List of posix xlator use by disk thread*/
d2787b
+    struct list_head diskth_xl;
d2787b
+    pthread_mutex_t xl_lock;
d2787b
+    pthread_cond_t xl_cond;
d2787b
+    pthread_t disk_space_check;
d2787b
     char volume_id[GF_UUID_BUF_SIZE]; /* Used only in protocol/client */
d2787b
 };
d2787b
 typedef struct _glusterfs_ctx glusterfs_ctx_t;
d2787b
diff --git a/xlators/storage/posix/src/posix-common.c b/xlators/storage/posix/src/posix-common.c
d2787b
index e5c6e62..2c9030b 100644
d2787b
--- a/xlators/storage/posix/src/posix-common.c
d2787b
+++ b/xlators/storage/posix/src/posix-common.c
d2787b
@@ -138,6 +138,36 @@ posix_inode(xlator_t *this)
d2787b
     return 0;
d2787b
 }
d2787b
 
d2787b
+static void
d2787b
+delete_posix_diskxl(xlator_t *this)
d2787b
+{
d2787b
+    struct posix_private *priv = this->private;
d2787b
+    struct posix_diskxl *pxl = priv->pxl;
d2787b
+    glusterfs_ctx_t *ctx = this->ctx;
d2787b
+    uint32_t count = 1;
d2787b
+
d2787b
+    if (pxl) {
d2787b
+        pthread_mutex_lock(&ctx->xl_lock);
d2787b
+        {
d2787b
+            pxl->detach_notify = _gf_true;
d2787b
+            while (pxl->is_use)
d2787b
+                pthread_cond_wait(&pxl->cond, &ctx->xl_lock);
d2787b
+            list_del_init(&pxl->list);
d2787b
+            priv->pxl = NULL;
d2787b
+            count = --ctx->diskxl_count;
d2787b
+            if (count == 0)
d2787b
+                pthread_cond_signal(&ctx->xl_cond);
d2787b
+        }
d2787b
+        pthread_mutex_unlock(&ctx->xl_lock);
d2787b
+        pthread_cond_destroy(&pxl->cond);
d2787b
+        GF_FREE(pxl);
d2787b
+        if (count == 0) {
d2787b
+            pthread_join(ctx->disk_space_check, NULL);
d2787b
+            ctx->disk_space_check = 0;
d2787b
+        }
d2787b
+    }
d2787b
+}
d2787b
+
d2787b
 /**
d2787b
  * notify - when parent sends PARENT_UP, send CHILD_UP event from here
d2787b
  */
d2787b
@@ -194,6 +224,8 @@ posix_notify(xlator_t *this, int32_t event, void *data, ...)
d2787b
             }
d2787b
             pthread_mutex_unlock(&ctx->fd_lock);
d2787b
 
d2787b
+            delete_posix_diskxl(this);
d2787b
+
d2787b
             gf_log(this->name, GF_LOG_INFO, "Sending CHILD_DOWN for brick %s",
d2787b
                    victim->name);
d2787b
             default_notify(this->parents->xlator, GF_EVENT_CHILD_DOWN, data);
d2787b
@@ -318,6 +350,7 @@ posix_reconfigure(xlator_t *this, dict_t *options)
d2787b
     int32_t force_directory_mode = -1;
d2787b
     int32_t create_mask = -1;
d2787b
     int32_t create_directory_mask = -1;
d2787b
+    double old_disk_reserve = 0.0;
d2787b
 
d2787b
     priv = this->private;
d2787b
 
d2787b
@@ -383,6 +416,7 @@ posix_reconfigure(xlator_t *this, dict_t *options)
d2787b
                " fallback to <hostname>:<export>");
d2787b
     }
d2787b
 
d2787b
+    old_disk_reserve = priv->disk_reserve;
d2787b
     GF_OPTION_RECONF("reserve", priv->disk_reserve, options, percent_or_size,
d2787b
                      out);
d2787b
     /* option can be any one of percent or bytes */
d2787b
@@ -390,11 +424,19 @@ posix_reconfigure(xlator_t *this, dict_t *options)
d2787b
     if (priv->disk_reserve < 100.0)
d2787b
         priv->disk_unit = 'p';
d2787b
 
d2787b
-    if (priv->disk_reserve) {
d2787b
+    /* Delete a pxl object from a list of disk_reserve while something
d2787b
+       is changed for reserve option during graph reconfigure
d2787b
+    */
d2787b
+    if (old_disk_reserve != priv->disk_reserve) {
d2787b
+        delete_posix_diskxl(this);
d2787b
+        old_disk_reserve = 0;
d2787b
+    }
d2787b
+
d2787b
+    if (!old_disk_reserve && priv->disk_reserve) {
d2787b
         ret = posix_spawn_disk_space_check_thread(this);
d2787b
         if (ret) {
d2787b
             gf_msg(this->name, GF_LOG_INFO, 0, P_MSG_DISK_SPACE_CHECK_FAILED,
d2787b
-                   "Getting disk space check from thread failed");
d2787b
+                   "Getting disk space check from thread failed ");
d2787b
             goto out;
d2787b
         }
d2787b
     }
d2787b
@@ -1008,13 +1050,13 @@ posix_init(xlator_t *this)
d2787b
                " fallback to <hostname>:<export>");
d2787b
     }
d2787b
 
d2787b
-    _private->disk_space_check_active = _gf_false;
d2787b
     _private->disk_space_full = 0;
d2787b
 
d2787b
     GF_OPTION_INIT("reserve", _private->disk_reserve, percent_or_size, out);
d2787b
 
d2787b
     /* option can be any one of percent or bytes */
d2787b
     _private->disk_unit = 0;
d2787b
+    pthread_cond_init(&_private->fd_cond, NULL);
d2787b
     if (_private->disk_reserve < 100.0)
d2787b
         _private->disk_unit = 'p';
d2787b
 
d2787b
@@ -1162,12 +1204,6 @@ posix_fini(xlator_t *this)
d2787b
         priv->health_check = 0;
d2787b
     }
d2787b
 
d2787b
-    if (priv->disk_space_check) {
d2787b
-        priv->disk_space_check_active = _gf_false;
d2787b
-        (void)gf_thread_cleanup_xint(priv->disk_space_check);
d2787b
-        priv->disk_space_check = 0;
d2787b
-    }
d2787b
-
d2787b
     if (priv->janitor) {
d2787b
         /*TODO: Make sure the synctask is also complete */
d2787b
         ret = gf_tw_del_timer(this->ctx->tw->timer_wheel, priv->janitor);
d2787b
@@ -1192,10 +1228,24 @@ posix_fini(xlator_t *this)
d2787b
         pthread_join(ctx->janitor, NULL);
d2787b
     }
d2787b
 
d2787b
+    pthread_mutex_lock(&ctx->xl_lock);
d2787b
+    {
d2787b
+        count = --ctx->diskxl_count;
d2787b
+        if (count == 0)
d2787b
+            pthread_cond_signal(&ctx->xl_cond);
d2787b
+    }
d2787b
+    pthread_mutex_unlock(&ctx->xl_lock);
d2787b
+
d2787b
+    if (count == 0) {
d2787b
+        pthread_join(ctx->disk_space_check, NULL);
d2787b
+        ctx->disk_space_check = 0;
d2787b
+    }
d2787b
+
d2787b
     if (priv->fsyncer) {
d2787b
         (void)gf_thread_cleanup_xint(priv->fsyncer);
d2787b
         priv->fsyncer = 0;
d2787b
     }
d2787b
+
d2787b
     /*unlock brick dir*/
d2787b
     if (priv->mount_lock)
d2787b
         (void)sys_closedir(priv->mount_lock);
d2787b
diff --git a/xlators/storage/posix/src/posix-handle.h b/xlators/storage/posix/src/posix-handle.h
d2787b
index c4d7cb1..8e4c719 100644
d2787b
--- a/xlators/storage/posix/src/posix-handle.h
d2787b
+++ b/xlators/storage/posix/src/posix-handle.h
d2787b
@@ -206,5 +206,6 @@ int
d2787b
 posix_check_internal_writes(xlator_t *this, fd_t *fd, int sysfd, dict_t *xdata);
d2787b
 
d2787b
 void
d2787b
-posix_disk_space_check(xlator_t *this);
d2787b
+posix_disk_space_check(struct posix_private* priv);
d2787b
+
d2787b
 #endif /* !_POSIX_HANDLE_H */
d2787b
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
d2787b
index ceac52a..110d383 100644
d2787b
--- a/xlators/storage/posix/src/posix-helpers.c
d2787b
+++ b/xlators/storage/posix/src/posix-helpers.c
d2787b
@@ -2284,9 +2284,8 @@ unlock:
d2787b
 }
d2787b
 
d2787b
 void
d2787b
-posix_disk_space_check(xlator_t *this)
d2787b
+posix_disk_space_check(struct posix_private *priv)
d2787b
 {
d2787b
-    struct posix_private *priv = NULL;
d2787b
     char *subvol_path = NULL;
d2787b
     int op_ret = 0;
d2787b
     double size = 0;
d2787b
@@ -2295,16 +2294,14 @@ posix_disk_space_check(xlator_t *this)
d2787b
     double totsz = 0;
d2787b
     double freesz = 0;
d2787b
 
d2787b
-    GF_VALIDATE_OR_GOTO(this->name, this, out);
d2787b
-    priv = this->private;
d2787b
-    GF_VALIDATE_OR_GOTO(this->name, priv, out);
d2787b
+    GF_VALIDATE_OR_GOTO("posix-helpers", priv, out);
d2787b
 
d2787b
     subvol_path = priv->base_path;
d2787b
 
d2787b
     op_ret = sys_statvfs(subvol_path, &buf;;
d2787b
 
d2787b
     if (op_ret == -1) {
d2787b
-        gf_msg(this->name, GF_LOG_ERROR, errno, P_MSG_STATVFS_FAILED,
d2787b
+        gf_msg("posix-disk", GF_LOG_ERROR, errno, P_MSG_STATVFS_FAILED,
d2787b
                "statvfs failed on %s", subvol_path);
d2787b
         goto out;
d2787b
     }
d2787b
@@ -2328,78 +2325,102 @@ out:
d2787b
 }
d2787b
 
d2787b
 static void *
d2787b
-posix_disk_space_check_thread_proc(void *data)
d2787b
+posix_ctx_disk_thread_proc(void *data)
d2787b
 {
d2787b
-    xlator_t *this = NULL;
d2787b
     struct posix_private *priv = NULL;
d2787b
+    glusterfs_ctx_t *ctx = NULL;
d2787b
     uint32_t interval = 0;
d2787b
-    int ret = -1;
d2787b
-
d2787b
-    this = data;
d2787b
-    priv = this->private;
d2787b
+    struct posix_diskxl *pthis = NULL;
d2787b
+    xlator_t *this = NULL;
d2787b
+    struct timespec sleep_till = {
d2787b
+        0,
d2787b
+    };
d2787b
 
d2787b
+    ctx = data;
d2787b
     interval = 5;
d2787b
-    gf_msg_debug(this->name, 0,
d2787b
-                 "disk-space thread started, "
d2787b
+
d2787b
+    gf_msg_debug("glusterfs_ctx", 0,
d2787b
+                 "Ctx disk-space thread started, "
d2787b
                  "interval = %d seconds",
d2787b
                  interval);
d2787b
-    while (1) {
d2787b
-        /* aborting sleep() is a request to exit this thread, sleep()
d2787b
-         * will normally not return when cancelled */
d2787b
-        ret = sleep(interval);
d2787b
-        if (ret > 0)
d2787b
-            break;
d2787b
-        /* prevent thread errors while doing the health-check(s) */
d2787b
-        pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
d2787b
-
d2787b
-        /* Do the disk-check.*/
d2787b
-        posix_disk_space_check(this);
d2787b
-        if (!priv->disk_space_check_active)
d2787b
-            goto out;
d2787b
-        pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
d2787b
-    }
d2787b
 
d2787b
-out:
d2787b
-    gf_msg_debug(this->name, 0, "disk space check thread exiting");
d2787b
-    LOCK(&priv->lock);
d2787b
+    pthread_mutex_lock(&ctx->xl_lock);
d2787b
     {
d2787b
-        priv->disk_space_check_active = _gf_false;
d2787b
+        while (ctx->diskxl_count > 0) {
d2787b
+            list_for_each_entry(pthis, &ctx->diskth_xl, list)
d2787b
+            {
d2787b
+                pthis->is_use = _gf_true;
d2787b
+                pthread_mutex_unlock(&ctx->xl_lock);
d2787b
+
d2787b
+                THIS = this = pthis->xl;
d2787b
+                priv = this->private;
d2787b
+
d2787b
+                posix_disk_space_check(priv);
d2787b
+
d2787b
+                pthread_mutex_lock(&ctx->xl_lock);
d2787b
+                pthis->is_use = _gf_false;
d2787b
+                /* Send a signal to posix_notify function */
d2787b
+                if (pthis->detach_notify)
d2787b
+                    pthread_cond_signal(&pthis->cond);
d2787b
+            }
d2787b
+
d2787b
+            timespec_now_realtime(&sleep_till);
d2787b
+            sleep_till.tv_sec += 5;
d2787b
+            (void)pthread_cond_timedwait(&ctx->xl_cond, &ctx->xl_lock,
d2787b
+                                         &sleep_till);
d2787b
+        }
d2787b
     }
d2787b
-    UNLOCK(&priv->lock);
d2787b
+    pthread_mutex_unlock(&ctx->xl_lock);
d2787b
 
d2787b
     return NULL;
d2787b
 }
d2787b
 
d2787b
 int
d2787b
-posix_spawn_disk_space_check_thread(xlator_t *xl)
d2787b
+posix_spawn_disk_space_check_thread(xlator_t *this)
d2787b
 {
d2787b
-    struct posix_private *priv = NULL;
d2787b
-    int ret = -1;
d2787b
+    int ret = 0;
d2787b
+    glusterfs_ctx_t *ctx = this->ctx;
d2787b
+    struct posix_diskxl *pxl = NULL;
d2787b
+    struct posix_private *priv = this->private;
d2787b
 
d2787b
-    priv = xl->private;
d2787b
+    pxl = GF_CALLOC(1, sizeof(struct posix_diskxl), gf_posix_mt_diskxl_t);
d2787b
+    if (!pxl) {
d2787b
+        ret = -ENOMEM;
d2787b
+        gf_log(this->name, GF_LOG_ERROR,
d2787b
+               "Calloc is failed to allocate "
d2787b
+               "memory for diskxl object");
d2787b
+        goto out;
d2787b
+    }
d2787b
+    pthread_cond_init(&pxl->cond, NULL);
d2787b
 
d2787b
-    LOCK(&priv->lock);
d2787b
+    pthread_mutex_lock(&ctx->xl_lock);
d2787b
     {
d2787b
-        /* cancel the running thread  */
d2787b
-        if (priv->disk_space_check_active == _gf_true) {
d2787b
-            pthread_cancel(priv->disk_space_check);
d2787b
-            priv->disk_space_check_active = _gf_false;
d2787b
-        }
d2787b
+        if (ctx->diskxl_count++ == 0) {
d2787b
+            ret = gf_thread_create(&ctx->disk_space_check, NULL,
d2787b
+                                   posix_ctx_disk_thread_proc, ctx,
d2787b
+                                   "posixctxres");
d2787b
 
d2787b
-        ret = gf_thread_create(&priv->disk_space_check, NULL,
d2787b
-                               posix_disk_space_check_thread_proc, xl,
d2787b
-                               "posix_reserve");
d2787b
-        if (ret) {
d2787b
-            priv->disk_space_check_active = _gf_false;
d2787b
-            gf_msg(xl->name, GF_LOG_ERROR, errno, P_MSG_DISK_SPACE_CHECK_FAILED,
d2787b
-                   "unable to setup disk space check thread");
d2787b
-            goto unlock;
d2787b
+            if (ret) {
d2787b
+                gf_msg(this->name, GF_LOG_ERROR, errno, P_MSG_THREAD_FAILED,
d2787b
+                       "spawning disk space check thread failed");
d2787b
+                ctx->diskxl_count--;
d2787b
+                pthread_mutex_unlock(&ctx->xl_lock);
d2787b
+                goto out;
d2787b
+            }
d2787b
         }
d2787b
+        pxl->xl = this;
d2787b
+        priv->pxl = (void *)pxl;
d2787b
+        list_add_tail(&pxl->list, &ctx->diskth_xl);
d2787b
+    }
d2787b
+    pthread_mutex_unlock(&ctx->xl_lock);
d2787b
 
d2787b
-        priv->disk_space_check_active = _gf_true;
d2787b
+out:
d2787b
+    if (ret) {
d2787b
+        if (pxl) {
d2787b
+            pthread_cond_destroy(&pxl->cond);
d2787b
+            GF_FREE(pxl);
d2787b
+        }
d2787b
     }
d2787b
-unlock:
d2787b
-    UNLOCK(&priv->lock);
d2787b
     return ret;
d2787b
 }
d2787b
 
d2787b
diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c
d2787b
index 1d37aed..761e018 100644
d2787b
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
d2787b
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
d2787b
@@ -37,6 +37,7 @@
d2787b
 #include <fcntl.h>
d2787b
 #endif /* HAVE_LINKAT */
d2787b
 
d2787b
+#include "posix-handle.h"
d2787b
 #include <glusterfs/glusterfs.h>
d2787b
 #include <glusterfs/checksum.h>
d2787b
 #include <glusterfs/dict.h>
d2787b
@@ -713,7 +714,7 @@ posix_do_fallocate(call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t flags,
d2787b
        option behaviour
d2787b
     */
d2787b
     if (priv->disk_reserve)
d2787b
-        posix_disk_space_check(this);
d2787b
+        posix_disk_space_check(priv);
d2787b
 
d2787b
     DISK_SPACE_CHECK_AND_GOTO(frame, priv, xdata, ret, ret, unlock);
d2787b
 
d2787b
diff --git a/xlators/storage/posix/src/posix-mem-types.h b/xlators/storage/posix/src/posix-mem-types.h
d2787b
index 2253f38..bb4c56d 100644
d2787b
--- a/xlators/storage/posix/src/posix-mem-types.h
d2787b
+++ b/xlators/storage/posix/src/posix-mem-types.h
d2787b
@@ -20,6 +20,7 @@ enum gf_posix_mem_types_ {
d2787b
     gf_posix_mt_paiocb,
d2787b
     gf_posix_mt_inode_ctx_t,
d2787b
     gf_posix_mt_mdata_attr,
d2787b
+    gf_posix_mt_diskxl_t,
d2787b
     gf_posix_mt_end
d2787b
 };
d2787b
 #endif
d2787b
diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h
d2787b
index 07f367b..4be979c 100644
d2787b
--- a/xlators/storage/posix/src/posix.h
d2787b
+++ b/xlators/storage/posix/src/posix.h
d2787b
@@ -36,7 +36,6 @@
d2787b
 #include <glusterfs/compat.h>
d2787b
 #include <glusterfs/timer.h>
d2787b
 #include "posix-mem-types.h"
d2787b
-#include "posix-handle.h"
d2787b
 #include <glusterfs/call-stub.h>
d2787b
 
d2787b
 #ifdef HAVE_LIBAIO
d2787b
@@ -138,6 +137,14 @@ struct posix_fd {
d2787b
     char _pad[4]; /* manual padding */
d2787b
 };
d2787b
 
d2787b
+struct posix_diskxl {
d2787b
+    pthread_cond_t cond;
d2787b
+    struct list_head list;
d2787b
+    xlator_t *xl;
d2787b
+    gf_boolean_t detach_notify;
d2787b
+    gf_boolean_t is_use;
d2787b
+};
d2787b
+
d2787b
 struct posix_private {
d2787b
     char *base_path;
d2787b
     int32_t base_path_length;
d2787b
@@ -207,6 +214,7 @@ struct posix_private {
d2787b
     pthread_mutex_t janitor_mutex;
d2787b
     pthread_cond_t janitor_cond;
d2787b
     pthread_cond_t fd_cond;
d2787b
+    pthread_cond_t disk_cond;
d2787b
     int fsync_queue_count;
d2787b
 
d2787b
     enum {
d2787b
@@ -233,7 +241,6 @@ struct posix_private {
d2787b
     char disk_unit;
d2787b
     uint32_t disk_space_full;
d2787b
     pthread_t disk_space_check;
d2787b
-    gf_boolean_t disk_space_check_active;
d2787b
 
d2787b
 #ifdef GF_DARWIN_HOST_OS
d2787b
     enum {
d2787b
@@ -263,6 +270,7 @@ struct posix_private {
d2787b
     gf_boolean_t ctime;
d2787b
     gf_boolean_t janitor_task_stop;
d2787b
     uint32_t rel_fdcount;
d2787b
+    void *pxl;
d2787b
 };
d2787b
 
d2787b
 typedef struct {
d2787b
-- 
d2787b
1.8.3.1
d2787b