diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2015-10-26 16:56:25 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-10-29 04:52:13 -0700 |
commit | 73f8a582e365ef43b2454f263b5ca91a6de0475e (patch) | |
tree | cd3031c9bbda6a566eb9d792e5ffe1db5c89704a /xlators/cluster | |
parent | 50646435b4076cfb30d7ebabf2d688f91c957cec (diff) |
cluster/afr: disable self-heal lock compatibility for arbiter volumes
Problem:
afrv2 takes locks from infinity-2 to infinity-1 to be compatible with <=3.5.x
clients. For arbiter volumes this leads to problems as the I/O takes full file
locks.
Solution:
Don't be compatible with <=3.5.x clients on arbiter volumes as arbiter volumes
are introduced in 3.7
>Change-Id: I48d6aab2000cab29c0c4acbf0ad356a3fa9e7bab
>BUG: 1275247
>Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
>Reviewed-on: http://review.gluster.org/12426
>Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
>Reviewed-by: Vijay Bellur <vbellur@redhat.com>
>Reviewed-by: Ravishankar N <ravishankar@redhat.com>
>Tested-by: NetBSD Build System <jenkins@build.gluster.org>
>(cherry picked from commit 33b1e373ee40546e1aeed00d4f5f7bfd6d9fefb9)
Change-Id: I22c00e94d7ab9bbcd1a6836fc6cfc300df26b765
BUG: 1276229
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/12455
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: jiademing.dd <iesool@126.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-data.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c index 6a3d6e13b1b..1a97778944c 100644 --- a/xlators/cluster/afr/src/afr-self-heal-data.c +++ b/xlators/cluster/afr/src/afr-self-heal-data.c @@ -727,14 +727,18 @@ __afr_selfheal_data (call_frame_t *frame, xlator_t *this, fd_t *fd, ret = 0; - /* 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; + 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, |