Raghavendra G 6e952607f1 rpc/rpc-transport: fix frame-loss during rdma-reads.
- 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
2010-09-24 07:10:27 -07:00
..
2010-08-30 06:54:12 -07:00