summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.h
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-09-15 14:22:44 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2014-10-30 07:18:27 -0700
commitdc8a3490e437d25ac2ee94a74778cd16c778514d (patch)
tree428e34cb92eab19de24f7e2ed54ed53cf0fa9659 /xlators/cluster/afr/src/afr.h
parent4dc4325a4c643b25fa7b670a30cf253491740d97 (diff)
cluster/afr: Handle EAGAIN properly in inodelk
Backport of http://review.gluster.org/8739 Problem: When one of the brick is taken down and brough back up in a replica pair, locks on that brick will be allowed. Afr returns inodelk success even when one of the bricks already has the lock taken. Fix: If any brick returns EAGAIN return failure to parent xlator. Note: This change only works for non-blocking inodelks. This patch addresses dht-synchronization which uses non-blocking locks for rename. Blocking lock is issued by only one of the rebalance processes. So for now there is no possibility of deadlock. BUG: 1151308 Change-Id: I72f15d8789442c29b5c7be2d5dabf7bae6bfa845 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8923 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r--xlators/cluster/afr/src/afr.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h
index 0a2b00168ea..63f658da09b 100644
--- a/xlators/cluster/afr/src/afr.h
+++ b/xlators/cluster/afr/src/afr.h
@@ -646,6 +646,13 @@ typedef struct _afr_local {
dict_t *params;
char *linkpath;
} symlink;
+
+ struct {
+ const char *volume;
+ int32_t cmd;
+ struct gf_flock flock;
+ } inodelk;
+
} cont;
struct {