diff options
author | Kotresh HR <khiremat@redhat.com> | 2016-04-29 17:45:31 +0530 |
---|---|---|
committer | Venky Shankar <vshankar@redhat.com> | 2016-05-01 21:33:33 -0700 |
commit | db468e4361315a91aaeeaa14ff7e6b448e2c8599 (patch) | |
tree | 750ecfe27bdb68275f1fe0de134942291fbad290 /xlators/features/bit-rot/src/bitd/bit-rot-ssm.h | |
parent | 3c01660f63a32e53395e9af13f33ee5439932cdf (diff) |
features/bitrot: Introduce scrubber monitor thread
The patch does following changes.
1. Introduce scrubber monitor thread.
2. Move scrub status related APIs to separate file
and make part of libbitrot library.
Problem:
Earlier, each child of the scrubber was maintaining
the state machine and hence there was no way to track
the start and end time of scrubbing as each brick has
it's own start and end time. Also each brick was maintaining
it's own timer wheel instance. It was also not possible
to get scrubbed files count per session as we could not
get last child which finishes scrubbing to reset it to
zero.
Solution:
Introduce scrubber monitor thread. It does following.
1. Maintains the scrubber state machine. Earlier each
child had it's own state machine. Now, only monitor
maintains on behalf of all it's children.
2. Maintains the timer wheel instance. Earlier each
child had it's own timer wheel instance. Now, only
monitor maintains on behalf of all it's children.
As a result, we can track the scrub statistics easily
and correctly.
Change-Id: Ic6e34ffa57984bd7a5ee81f4e263342bc1d9b302
BUG: 1329211
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/14044
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'xlators/features/bit-rot/src/bitd/bit-rot-ssm.h')
-rw-r--r-- | xlators/features/bit-rot/src/bitd/bit-rot-ssm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot-ssm.h b/xlators/features/bit-rot/src/bitd/bit-rot-ssm.h index 72fd62b3630..936ee4d837c 100644 --- a/xlators/features/bit-rot/src/bitd/bit-rot-ssm.h +++ b/xlators/features/bit-rot/src/bitd/bit-rot-ssm.h @@ -29,8 +29,8 @@ typedef enum br_scrub_event { BR_SCRUB_MAXEVENTS, } br_scrub_event_t; -struct br_child; +struct br_monitor; -int32_t br_scrub_state_machine (xlator_t *, struct br_child *); +int32_t br_scrub_state_machine (xlator_t *); #endif /* __BIT_ROT_SSM_H__ */ |