diff options
Diffstat (limited to 'xlators/features/bit-rot/src')
-rw-r--r-- | xlators/features/bit-rot/src/bitd/bit-rot-scrub.c | 5 | ||||
-rw-r--r-- | xlators/features/bit-rot/src/bitd/bit-rot.c | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c index 72bdb843488..e043ef84a52 100644 --- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c +++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c @@ -1049,16 +1049,11 @@ br_fsscan_ondemand (xlator_t *this) char timestr[1024] = {0,}; struct timeval now = {0,}; br_private_t *priv = NULL; - struct br_scrubber *fsscrub = NULL; struct br_monitor *scrub_monitor = NULL; priv = this->private; - fsscrub = &priv->fsscrub; scrub_monitor = &priv->scrub_monitor; - if (!fsscrub->frequency_reconf) - return 0; - (void) gettimeofday (&now, NULL); timo = BR_SCRUB_ONDEMAND; diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c index e55a22f1cdc..42067949d8b 100644 --- a/xlators/features/bit-rot/src/bitd/bit-rot.c +++ b/xlators/features/bit-rot/src/bitd/bit-rot.c @@ -1682,8 +1682,14 @@ notify (xlator_t *this, int32_t event, void *data, ...) gf_log (this->name, GF_LOG_INFO, "BitRot scrub ondemand " "called"); - if (scrub_monitor->state != BR_SCRUB_STATE_PENDING) + if (scrub_monitor->state != BR_SCRUB_STATE_PENDING) { + gf_msg (this->name, GF_LOG_ERROR, 0, + BRB_MSG_RESCHEDULE_SCRUBBER_FAILED, + "on demand scrub schedule failed. Scrubber is " + "not in pending state. Current state is %d", + scrub_monitor->state); return -2; + } /* Needs synchronization with reconfigure thread */ pthread_mutex_lock (&priv->lock); |