summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-common.c
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2014-07-18 15:36:42 +0530
committerVijay Bellur <vbellur@redhat.com>2014-09-08 10:21:17 -0700
commit0db65a084608a9deb0d0917f084e0d55e23e54a7 (patch)
treeeb5447fb94e95dabaf3ac0af44803970b47dd57b /xlators/cluster/afr/src/afr-common.c
parent10aebe1c8be9ab87be233b4c4e6d94279864c461 (diff)
features/changelog: Capture "correct" internal FOPs
This patch fixes changelog capturing internal FOPs in a cascaded setup, where the intermediate master would record internal FOPs (generated by DHT on link()/rename()). This is due to I/O happening on the intermediate slave on geo-replication's auxillary mount with client-pid -1. Currently, the internal FOP capturing logic depends on client pid being non-negative and the presence of a special key in dictionary. Due to this, internal FOPs on an inter-mediate master would be recorded in the changelog. Checking client-pid being non-negative was introduced to capture AFR self-heal traffic in changelog, thereby breaking cascading setups. By coincidence, AFR self-heal daemon uses -1 as frame->root->pid thereby making is hard to differentiate b/w geo-rep's auxillary mount and self-heal daemon. BUG: 1138952 Change-Id: Ia08a2cfa3b02bb785f343794f5b2695d44398c4c Original-Author: Venky Shankar <vshankar@redhat.com> Signed-off-by: Kotresh H R <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/8347 Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/8638
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r--xlators/cluster/afr/src/afr-common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 13dd81e25fe..8fc202512f1 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -514,7 +514,7 @@ afr_inode_refresh_done (call_frame_t *frame, xlator_t *this)
if (ret && afr_selfheal_enabled (this)) {
heal = copy_frame (frame);
if (heal)
- heal->root->pid = -1;
+ heal->root->pid = GF_CLIENT_PID_AFR_SELF_HEALD;
ret = synctask_new (this->ctx->env, afr_refresh_selfheal_wrap,
afr_refresh_selfheal_done, heal, frame);
if (ret)
@@ -1497,7 +1497,7 @@ afr_lookup_entry_heal (call_frame_t *frame, xlator_t *this)
if (need_heal) {
heal = copy_frame (frame);
if (heal)
- heal->root->pid = -1;
+ heal->root->pid = GF_CLIENT_PID_AFR_SELF_HEALD;
ret = synctask_new (this->ctx->env, afr_lookup_selfheal_wrap,
afr_refresh_selfheal_done, heal, frame);
if (ret)