diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2016-04-11 16:07:40 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2016-04-18 06:57:04 -0700 |
commit | 0a92f05021ac7e24a16b09ef326461e6deeb5fc8 (patch) | |
tree | 9b2ec68a36bf59a72f8626667bd5e13948462ae3 /xlators/mgmt/glusterd/src/glusterd-utils.h | |
parent | 80fd2a0d8b3da20755a38195f62fc4d7fc5f7b52 (diff) |
glusterd: populate brickinfo->real_path conditionally
Backport of http://review.gluster.org/13965
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: 1326174
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/13965
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/13973
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 6b74e900c17..9f8a64fe0e8 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -118,7 +118,9 @@ int32_t glusterd_brickinfo_new (glusterd_brickinfo_t **brickinfo); int32_t -glusterd_brickinfo_new_from_brick (char *brick, glusterd_brickinfo_t **brickinfo); +glusterd_brickinfo_new_from_brick (char *brick, + glusterd_brickinfo_t **brickinfo, + gf_boolean_t construct_real_path); int32_t glusterd_volinfo_find (char *volname, glusterd_volinfo_t **volinfo); @@ -164,7 +166,8 @@ glusterd_is_cli_op_req (int32_t op); int32_t glusterd_volume_brickinfo_get_by_brick (char *brick, glusterd_volinfo_t *volinfo, - glusterd_brickinfo_t **brickinfo); + glusterd_brickinfo_t **brickinfo, + gf_boolean_t construct_real_path); int32_t glusterd_add_volumes_to_export_dict (dict_t **peer_data); |