summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/src/bitd/bit-rot-scrub.h
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2015-05-21 19:55:02 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-28 04:19:27 -0700
commit6fc12a43f3e20ea24969e5a3c949f7c27d9c1893 (patch)
tree08d2525bb859464ae7de2c534363f76db878f144 /xlators/features/bit-rot/src/bitd/bit-rot-scrub.h
parente878b0bcbaa19e46517e44284685ef99b885117b (diff)
features/bitrot: reimplement scrubbing frequency
This patch reimplments existing scrub-frequency mechanism used to schedule scrubber runs. Existing mechanism uses periodic sleeps (waking up periodically on minimum granularity) and performing a number of tracking checks based on counters and sleep times. This patch does away with all the nifty counters and uses timer-wheel to schedule scrub runs. Scheduling changes are peformed by merely calculating the new expiry time and calling mod_timer() [mod_timer_pending() in some cases] making the code more debuggable and easier to follow. This also introduces "hourly" scrubbing tunable as an aid for testing scrubbing during development/testing cycle. One could also implement on-demand scrubbing with ease: by invoking mod_timer() with an expiry of one (1) second, thereby scheduling a scrub run the very next second. Change-Id: I6c7c5f0c6c9f886bf574d88c04cde14b76e60a8b BUG: 1224596 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/10893 Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Tested-by: NetBSD Build System Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/bit-rot/src/bitd/bit-rot-scrub.h')
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot-scrub.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.h b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.h
index 4f00020d66a..6c4254a397a 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.h
+++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.h
@@ -16,6 +16,12 @@
void *br_fsscanner (void *);
+int32_t br_fsscan_schedule (xlator_t *, br_child_t *,
+ struct br_scanfs *, struct br_scrubber *);
+int32_t br_fsscan_reschedule (xlator_t *this,
+ br_child_t *child, struct br_scanfs *,
+ struct br_scrubber *, gf_boolean_t);
+
int32_t br_scrubber_handle_options (xlator_t *, br_private_t *, dict_t *);
int32_t br_scrubber_init (xlator_t *, br_private_t *);