From 02583099a219ce327aac62af22b486c7b9fcb531 Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Wed, 6 May 2015 13:10:15 +0530 Subject: glusterd: Use generation number to find peerinfo in RPC notifications The generation number for each peerinfo object is unique. It can be used to find the exact peerinfo object, which is required for peer RPC notifications. Using hostname and uuid matching to find peerinfos can return incorrect peerinfos to be returned in certain cases like multi network peer probe. This could cause updates to happen to incorrect peerinfos. Change-Id: Ia0aada8214fd6d43381e5afd282e08d53a277251 BUG: 1215018 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.org/10495 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-peer-utils.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-peer-utils.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-peer-utils.h b/xlators/mgmt/glusterd/src/glusterd-peer-utils.h index 3a1aee7cd15..bd30e335f69 100644 --- a/xlators/mgmt/glusterd/src/glusterd-peer-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-peer-utils.h @@ -82,4 +82,6 @@ gd_add_peer_hostnames_to_dict (glusterd_peerinfo_t *peerinfo, dict_t *dict, int gd_add_peer_detail_to_dict (glusterd_peerinfo_t *peerinfo, dict_t *friends, int count); +glusterd_peerinfo_t * +glusterd_peerinfo_find_by_generation (uint32_t generation); #endif /* _GLUSTERD_PEER_UTILS_H */ -- cgit