summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2016-07-04 17:25:57 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-07-11 06:32:04 -0700
commitf4757d256e3e00132ef204c01ed61f78f705ad6b (patch)
treefe31efb87230af38229de9c6e58d10897bed4cde /xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
parentb2c73cbf423de6201f956f522b7429615c88869d (diff)
feature/bitrot: Show whether scrub is in progress/idle
Bitrot scrub status shows whether the scrub is paused or active. It doesn't show whether the scrubber is actually scrubbing or waiting in the timer wheel for the next schedule. This patch shows this status with "In Progress" and "Idle" respectively. Change-Id: I995d8553d1ff166503ae1e7b46282fc3ba961f0b BUG: 1352871 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/14864 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/features/bit-rot/src/bitd/bit-rot-scrub.c')
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot-scrub.c2
1 files changed, 2 insertions, 0 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 8b95f056a16..a5885642b89 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
@@ -664,6 +664,7 @@ br_scrubber_entry_control (xlator_t *this)
if (scrub_monitor->state == BR_SCRUB_STATE_PENDING)
scrub_monitor->state = BR_SCRUB_STATE_ACTIVE;
br_scrubber_log_time (this, "started");
+ priv->scrub_stat.scrub_running = 1;
}
UNLOCK (&scrub_monitor->lock);
}
@@ -680,6 +681,7 @@ br_scrubber_exit_control (xlator_t *this)
LOCK (&scrub_monitor->lock);
{
br_scrubber_log_time (this, "finished");
+ priv->scrub_stat.scrub_running = 0;
if (scrub_monitor->state == BR_SCRUB_STATE_ACTIVE) {
(void) br_fsscan_activate (this);