diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 720e8955b68..994c6933ef4 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -1027,15 +1027,22 @@ glusterd_get_next_available_brickid (glusterd_volinfo_t *volinfo) int32_t glusterd_resolve_brick (glusterd_brickinfo_t *brickinfo) { - int32_t ret = -1; - xlator_t *this = NULL; + int32_t ret = -1; + xlator_t *this = NULL; this = THIS; GF_ASSERT (this); GF_ASSERT (brickinfo); + if (!gf_uuid_compare(brickinfo->uuid, MY_UUID) || + (glusterd_peerinfo_find_by_uuid (brickinfo->uuid) != NULL)) { + ret = 0; + goto out; + } ret = glusterd_hostname_to_uuid (brickinfo->hostname, brickinfo->uuid); + +out: gf_msg_debug (this->name, 0, "Returning %d", ret); return ret; } |