summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/src/stub/bit-rot-stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/bit-rot/src/stub/bit-rot-stub.c')
-rw-r--r--xlators/features/bit-rot/src/stub/bit-rot-stub.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
index 895e769..b8a3442 100644
--- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c
+++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
@@ -10,6 +10,7 @@
#include <ctype.h>
#include <sys/uio.h>
+#include <signal.h>
#include "glusterfs.h"
#include "xlator.h"
@@ -212,6 +213,35 @@ out:
return ret;
}
+
+int
+notify (xlator_t *this, int event, void *data, ...)
+{
+ br_stub_private_t *priv = NULL;
+
+ if (!this)
+ return 0;
+
+ priv = this->private;
+ if (!priv)
+ return 0;
+
+ switch (event) {
+ case GF_EVENT_CLEANUP:
+ if (priv->signth) {
+ (void) gf_thread_cleanup_xint (priv->signth);
+ priv->signth = 0;
+ }
+ if (priv->container.thread) {
+ (void) gf_thread_cleanup_xint (priv->container.thread);
+ priv->container.thread = 0;
+ }
+ break;
+ }
+ default_notify (this, event, data);
+ return 0;
+}
+
void
fini (xlator_t *this)
{
@@ -832,6 +862,7 @@ br_stub_signth (void *arg)
THIS = this;
while (1) {
+
pthread_mutex_lock (&priv->lock);
{
while (list_empty (&priv->squeue))