path: root/rpc/rpc-lib/src
diff options
authorMohit Agrawal <>2019-01-22 12:57:50 +0530
committerAmar Tumballi <>2019-01-24 06:54:41 +0000
commit04f84756e1baa5eff4560339700f82970eaa5d80 (patch)
treee7fc211006eb525ae16833209a3fe07472a25ced /rpc/rpc-lib/src
parent9de432847cd699457623de84f76f7598aecd61e3 (diff)
core: heketi-cli is throwing error "target is busy"
Problem: At the time of deleting block hosting volume through heketi-cli , it is throwing an error "target is busy". cli is throwing an error because brick is not detached successfully and brick is not detached due to race condition to cleanp xprt associated with detached brick Solution: To avoid xprt specifc race condition introduce an atomic flag on rpc_transport Change-Id: Id4ff1fe8375a63be71fb3343f455190a1b8bb6d4 fixes: bz#1668190 Signed-off-by: Mohit Agrawal <>
Diffstat (limited to 'rpc/rpc-lib/src')
2 files changed, 2 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c
index e6421fcfab5..f9cbdf133c7 100644
--- a/rpc/rpc-lib/src/rpc-transport.c
+++ b/rpc/rpc-lib/src/rpc-transport.c
@@ -365,6 +365,7 @@ rpc_transport_load(glusterfs_ctx_t *ctx, dict_t *options, char *trans_name)
+ GF_ATOMIC_INIT(trans->disconnect_progress, 0);
return_trans = trans;
diff --git a/rpc/rpc-lib/src/rpc-transport.h b/rpc/rpc-lib/src/rpc-transport.h
index 7be1ba14a0c..9e75d1a2bbb 100644
--- a/rpc/rpc-lib/src/rpc-transport.h
+++ b/rpc/rpc-lib/src/rpc-transport.h
@@ -214,6 +214,7 @@ struct rpc_transport {
gf_boolean_t connect_failed;
char notify_poller_death;
char poller_death_accept;
+ gf_atomic_t disconnect_progress;
struct rpc_transport_ops {