diff options
| author | Kotresh HR <khiremat@redhat.com> | 2016-05-09 16:54:00 +0530 |
|---|---|---|
| committer | Niels de Vos <ndevos@redhat.com> | 2016-06-13 04:22:51 -0700 |
| commit | faaee8c7cee1c3d8fcdcf7fcd3b27feba943f76f (patch) | |
| tree | 978ba5b9c8fb1810f8d1b9786802a0e093ccd417 /xlators/features/changelog/src/changelog-helpers.h | |
| parent | 4e553071de6455d36ea49cb1d41ff9e57ca43bc8 (diff) | |
features/changelog: Change barrier notification mechanism
Backport of http://review.gluster.org/#/c/14272/
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
(cherry picked from commit be00012e7be55d25870411f3e975db9a8e19c70a)
Change-Id: I530ea90d9a06953f8b23b4e12d122872ee1925de
BUG: 1342083
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/14614
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/features/changelog/src/changelog-helpers.h')
| -rw-r--r-- | xlators/features/changelog/src/changelog-helpers.h | 8 |
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; |
