From d129d4eea33aae5db24dba17adcb04e9d4829817 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Mon, 11 Apr 2016 16:07:40 +0530 Subject: glusterd: populate brickinfo->real_path conditionally glusterd_brickinfo_new_from_brick () is called from multiple places and one of them is glusterd_brick_rpc_notify where its very well possible that an underlying brick's file system has crashed and a disconnect event has been received. In this case glusterd tries to build the brickinfo from the brickid in the RPC request, however the same fails as glusterd_brickinfo_new_from_brick () fails from realpath. Fix is to skip populating real_path if its a disconnect event. Change-Id: I9d9149c64a9cf2247abb731f219c1b1eef037960 BUG: 1325841 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/13965 Smoke: Gluster Build System CentOS-regression: Gluster Build System NetBSD-regression: NetBSD Build System Reviewed-by: Jeff Darcy --- xlators/mgmt/glusterd/src/glusterd-rebalance.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-rebalance.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index 5bf456ba00b..60d1b204da5 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -602,7 +602,8 @@ glusterd_brick_validation (dict_t *dict, char *key, data_t *value, GF_ASSERT (this); ret = glusterd_volume_brickinfo_get_by_brick (value->data, volinfo, - &brickinfo); + &brickinfo, + _gf_true); if (ret) { gf_msg (this->name, GF_LOG_ERROR, EINVAL, GD_MSG_BRICK_NOT_FOUND, -- cgit