diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/features/changetimerecorder/src/changetimerecorder.c | 4 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 6 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix.c | 1 |
3 files changed, 6 insertions, 5 deletions
diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c index 1811cec420f..7598e432797 100644 --- a/xlators/features/changetimerecorder/src/changetimerecorder.c +++ b/xlators/features/changetimerecorder/src/changetimerecorder.c @@ -2315,9 +2315,9 @@ notify (xlator_t *this, int event, void *data, ...) CTR_MSG_CLOSE_DB_CONN_FAILED, "Failed closing " "db connection"); } - } else { - ret = default_notify (this, event, data); } + ret = default_notify (this, event, data); + out: return ret; diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index 52be925aae2..9e4ab5e7d98 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -1864,15 +1864,15 @@ posix_health_check_thread_proc (void *data) ret = sleep (interval); if (ret > 0) break; - /* prevent thread errors while doing the health-check(s) */ pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL); /* Do the health-check.*/ ret = posix_fs_health_check (this); - if (ret < 0) + if (ret < 0 && priv->health_check_active) goto abort; - + if (!priv->health_check_active) + goto out; pthread_setcancelstate (PTHREAD_CANCEL_ENABLE, NULL); } diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 754a45aa6fb..5a11f62dcc7 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -6639,6 +6639,7 @@ notify (xlator_t *this, break; case GF_EVENT_CLEANUP: if (priv->health_check) { + priv->health_check_active = _gf_false; pthread_cancel (priv->health_check); priv->health_check = 0; } |