summaryrefslogtreecommitdiffstats
path: root/xlators/features/changelog/src/changelog-helpers.h
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2016-05-09 16:54:00 +0530
committerJeff Darcy <jdarcy@redhat.com>2016-05-31 11:59:58 -0700
commitbe00012e7be55d25870411f3e975db9a8e19c70a (patch)
treed07c1a9ce1ecb2e6222a00065738cc9d6ef4ece9 /xlators/features/changelog/src/changelog-helpers.h
parentf55a973e581aaa25bbe38be83e007e1b2eaed659 (diff)
features/changelog: Change barrier notification mechanism
The barrier notification mechanism was fd based and 'select' was being used. 'select' breaks when number of fds opened by brick process exceeds 1024. To avoid this and also the maintainance of pipe between notify and 'changelog_rollover', the pipe has been replaced with pthread condition signal and timed wait mechanism. Change-Id: I530ea90d9a06953f8b23b4e12d122872ee1925de BUG: 1334314 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/14272 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/features/changelog/src/changelog-helpers.h')
-rw-r--r--xlators/features/changelog/src/changelog-helpers.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/xlators/features/changelog/src/changelog-helpers.h b/xlators/features/changelog/src/changelog-helpers.h
index 70e6f60f30c..4fdba244aa1 100644
--- a/xlators/features/changelog/src/changelog-helpers.h
+++ b/xlators/features/changelog/src/changelog-helpers.h
@@ -116,8 +116,9 @@ typedef struct changelog_rollover {
xlator_t *this;
- /* read end of pipe used as event from barrier on snapshot */
- int rfd;
+ pthread_mutex_t lock;
+ pthread_cond_t cond;
+ gf_boolean_t notify;
} changelog_rollover_t;
typedef struct changelog_fsync {
@@ -265,9 +266,6 @@ struct changelog_priv {
/* Represents the active color. Initially by default black */
chlog_fop_color_t current_color;
- /* write end of pipe to do explicit rollover on barrier during snap */
- int cr_wfd;
-
/* flag to determine explicit rollover is triggered */
gf_boolean_t explicit_rollover;