summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-transport/rdma/src/rdma.h
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-09-24 07:51:53 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-24 07:10:27 -0700
commit6e952607f17dd5ea6e3748f2bbc26234f4b1e553 (patch)
treeb31bbfc39505c238058be5df1cb7baad7b826493 /rpc/rpc-transport/rdma/src/rdma.h
parentf2c5894f254d9b3d17b058adce7c7b4152da2f5e (diff)
rpc/rpc-transport: fix frame-loss during rdma-reads.v3.1.0qa31
- total no of rdma reads in progress was tracked using refcount of post (refcount = total rdma reads + 1). However doing rdma_post_unref _after_ rdma_do_reads, can result in race condition between execution of rdma_post_unref and procedure handling rdma read completion. This makes it impossible to find out whether the current rdma read was the last rdma-read being done in procedure handling rdma read-completion. The fix to this should either do rdma_post_unref before posting an rdma read or use another variable to track the number of rdma-reads. This patch implements second method. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1700 (write fops are bailing out on a distribute setup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1700
Diffstat (limited to 'rpc/rpc-transport/rdma/src/rdma.h')
-rw-r--r--rpc/rpc-transport/rdma/src/rdma.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/rpc/rpc-transport/rdma/src/rdma.h b/rpc/rpc-transport/rdma/src/rdma.h
index 51242d6b4ad..04386a98faf 100644
--- a/rpc/rpc-transport/rdma/src/rdma.h
+++ b/rpc/rpc-transport/rdma/src/rdma.h
@@ -257,6 +257,7 @@ struct __rdma_post_context {
int count;
struct iobref *iobref;
char is_request;
+ int rdma_reads;
rdma_reply_info_t *reply_info;
};
typedef struct __rdma_post_context rdma_post_context_t;