From 081f9febeec61787ebe81850a081beda17de3047 Mon Sep 17 00:00:00 2001 From: Prashanth Pai Date: Thu, 27 Apr 2017 18:26:02 +0530 Subject: glusterd: Fix removing pmap entry on rpc disconnect Problem: The following line of code intended to remove pmap entry for the connection during disconnects: pmap_registry_remove (this, 0, NULL, GF_PMAP_PORT_NONE, xprt); However, no pmap entry will have it's type set to GF_PMAP_PORT_NONE at any point in time. So a call to pmap_registry_search_by_xprt() in pmap_registry_remove() will always fail to find a match. Fix: Optionally ignore pmap entry's type in pmap_registry_search_by_xprt(). BUG: 1193929 Change-Id: I705f101739ab1647ff52a92820d478354407264a Signed-off-by: Prashanth Pai Reviewed-on: https://review.gluster.org/17129 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Jeff Darcy --- rpc/rpc-lib/src/protocol-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rpc/rpc-lib/src') diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h index b5f5bdee50e..ee98f3d4959 100644 --- a/rpc/rpc-lib/src/protocol-common.h +++ b/rpc/rpc-lib/src/protocol-common.h @@ -106,7 +106,7 @@ enum gf_pmap_port_type { GF_PMAP_PORT_FREE = 0, GF_PMAP_PORT_FOREIGN, /* it actually means, not sure who is using it, but it is in-use */ GF_PMAP_PORT_LEASED, - GF_PMAP_PORT_NONE, + GF_PMAP_PORT_ANY, GF_PMAP_PORT_BRICKSERVER, /* port used by brick process */ }; typedef enum gf_pmap_port_type gf_pmap_port_type_t; -- cgit