From: Doug Oucharek Date: Mon, 15 Aug 2016 21:14:38 +0000 (-0700) Subject: LU-8501 lnet: Ensure routing is turned on first time X-Git-Tag: 2.8.58~55 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F34%2F21934%2F2;p=fs%2Flustre-release.git LU-8501 lnet: Ensure routing is turned on first time In lnet_rtrpools_enable(), a mistake was made and routing was not being turned on when the rtrpools are being allocated for the first time. This patch fixes that routine so we remember to turn on routing after allocating the rtrpools. Test-Parameters: trivial Signed-off-by: Doug Oucharek Change-Id: I8ef3e11bc8082cdce93e53d640f69e59ddbe9588 Reviewed-on: http://review.whamcloud.com/21934 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Amir Shehata Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/router.c b/lnet/lnet/router.c index 958729c..5a1e56f 100644 --- a/lnet/lnet/router.c +++ b/lnet/lnet/router.c @@ -1674,7 +1674,7 @@ lnet_rtrpools_adjust(int tiny, int small, int large) int lnet_rtrpools_enable(void) { - int rc; + int rc = 0; if (the_lnet.ln_routing) return 0; @@ -1685,9 +1685,9 @@ lnet_rtrpools_enable(void) * standard buffer pool allocation routine as * if we are just configuring this for the first * time. */ - return lnet_rtrpools_alloc(1); - - rc = lnet_rtrpools_adjust_helper(0, 0, 0); + rc = lnet_rtrpools_alloc(1); + else + rc = lnet_rtrpools_adjust_helper(0, 0, 0); if (rc != 0) return rc; @@ -1697,7 +1697,7 @@ lnet_rtrpools_enable(void) the_lnet.ln_ping_info->pi_features &= ~LNET_PING_FEAT_RTE_DISABLED; lnet_net_unlock(LNET_LOCK_EX); - return 0; + return rc; } void