diff options
Diffstat (limited to 'xlators/storage/posix/src/posix-helpers.c')
-rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index 826441f1dd7..77affc45ae0 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -1990,10 +1990,10 @@ posix_disk_space_check (xlator_t *this) GF_VALIDATE_OR_GOTO (this->name, this, out); priv = this->private; - GF_VALIDATE_OR_GOTO ("posix-helpers", priv, out); + GF_VALIDATE_OR_GOTO (this->name, priv, out); subvol_path = priv->base_path; - percent = priv->disk_threshhold; + percent = priv->disk_reserve; op_ret = sys_statvfs (subvol_path, &buf); @@ -2073,9 +2073,9 @@ posix_spawn_disk_space_check_thread (xlator_t *xl) priv->disk_space_check_active = _gf_false; } - ret = gf_thread_create (&priv->disk_space_check, NULL, - posix_disk_space_check_thread_proc, - xl, "posix_reserve"); + ret = gf_thread_create_detached (&priv->disk_space_check, + posix_disk_space_check_thread_proc, + xl, "posix_reserve"); if (ret < 0) { priv->disk_space_check_active = _gf_false; gf_msg (xl->name, GF_LOG_ERROR, errno, @@ -2084,8 +2084,6 @@ posix_spawn_disk_space_check_thread (xlator_t *xl) goto unlock; } - /* run the thread detached, resources will be freed on exit */ - pthread_detach (priv->disk_space_check); priv->disk_space_check_active = _gf_true; } unlock: |