summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/src/bitd/bit-rot.h
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2015-05-13 14:35:47 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-28 08:39:36 -0700
commit19818254fa7d2b227d212e0a62c37846aef3fc24 (patch)
tree760ee544e59df81d4a2cc76f001f9eba41bbf6e7 /xlators/features/bit-rot/src/bitd/bit-rot.h
parent7bfd49705b8c17e779b88dd33122d2ce213dd1fb (diff)
features/bitrot: refactor brick connection logic
Brick connection was bloated (and not implemented efficiently) with calls which were not required to be called under lock. This resulted in starvation of lock by critical code paths. This eventally did not scale when the number of bricks per volume increases (add-brick and the likes). Also, this patch cleans up some of the weird reconnection logic that added more to the starvation of resources and cleans up uncontrolled growing of log files. Change-Id: I05e737f2a9742944a4a543327d167de2489236a4 BUG: 1207134 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Signed-off-by: Venky Shankar <vshankar@redhat.com> Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/10763 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: NetBSD Build System
Diffstat (limited to 'xlators/features/bit-rot/src/bitd/bit-rot.h')
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.h b/xlators/features/bit-rot/src/bitd/bit-rot.h
index ec943e9131f..40e02ebf378 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot.h
+++ b/xlators/features/bit-rot/src/bitd/bit-rot.h
@@ -143,13 +143,17 @@ struct br_private {
struct list_head bricks; /* list of bricks from which CHILD_UP
has been received */
- pthread_cond_t cond; /* handling CHILD_UP notifications */
+ struct list_head signing;
+
pthread_cond_t object_cond; /* handling signing of objects */
int child_count;
br_child_t *children; /* list of subvolumes */
int up_children;
+
+ pthread_cond_t cond; /* handling CHILD_UP notifications */
pthread_t thread; /* thread for connecting each UP
child with changelog */
+
struct tvec_base *timer_wheel; /* timer wheel where the objects which
changelog has sent sits and waits
for expiry */
@@ -163,6 +167,7 @@ struct br_private {
br_tbf_t *tbf; /* token bucket filter */
gf_boolean_t iamscrubber; /* function as a fs scrubber */
+
struct br_scrubber fsscrub; /* scrubbers for this subvolume */
};