summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2015-11-18 08:30:48 +0530
committerJeff Darcy <jdarcy@redhat.com>2015-11-18 11:34:37 -0800
commit4b8249a35aba28621ed59155ab27fb5bfa5f113f (patch)
tree9522217dd2ece5d244efd563a2bdaa31c8d56af4 /xlators
parent5bb3c521431cc27b2826acd889bffb2f90ae7f73 (diff)
afr: Drop compatibility lock for data self-heal
In glusterfs 3.4 and older, AFR did not take locks in self-heal domain during data self-heal. So this compat lock in data domain was added to prevent older clients from trying to heal a file while an existing self-heal was going on by a newer client. But the side effect was that all appending writes (which take full locks in data domain) from mounts would be stalled until self-heal was complete. Since glusterfs 3.4 is not supported anymore, remove the compat lock. Change-Id: I31c8e4d7f3364f769a14eec295154e3c40d9f78e BUG: 1283032 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12602 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 2dbbd257dfa..9726add5c82 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -667,9 +667,7 @@ __afr_selfheal_data (call_frame_t *frame, xlator_t *this, fd_t *fd,
unsigned char *healed_sinks = NULL;
struct afr_reply *locked_replies = NULL;
int source = -1;
- gf_boolean_t compat = _gf_false;
gf_boolean_t did_sh = _gf_true;
- unsigned char *compat_lock = NULL;
priv = this->private;
@@ -677,7 +675,6 @@ __afr_selfheal_data (call_frame_t *frame, xlator_t *this, fd_t *fd,
sinks = alloca0 (priv->child_count);
healed_sinks = alloca0 (priv->child_count);
data_lock = alloca0 (priv->child_count);
- compat_lock = alloca0 (priv->child_count);
locked_replies = alloca0 (sizeof (*locked_replies) * priv->child_count);
@@ -722,18 +719,6 @@ __afr_selfheal_data (call_frame_t *frame, xlator_t *this, fd_t *fd,
ret = 0;
- if (priv->arbiter_count == 0) {/*TODO: delete this code after
- 3.5.x goes out of support*/
- /* Locking from (LLONG_MAX - 2) to (LLONG_MAX - 1) is
- for compatibility with older self-heal clients which
- do not hold a lock in the @priv->sh_domain domain to
- guard against concurrent ongoing self-heals
- */
- afr_selfheal_inodelk (frame, this, fd->inode,
- this->name, LLONG_MAX - 2, 1,
- compat_lock);
- compat = _gf_true;
- }
}
unlock:
afr_selfheal_uninodelk (frame, this, fd->inode, this->name, 0, 0,
@@ -753,9 +738,6 @@ unlock:
healed_sinks, AFR_DATA_TRANSACTION,
locked_replies, data_lock);
out:
- if (compat)
- afr_selfheal_uninodelk (frame, this, fd->inode, this->name,
- LLONG_MAX - 2, 1, compat_lock);
if (did_sh)
afr_log_selfheal (fd->inode->gfid, this, ret, "data", source,