From f75631655890260549b12233589ee4b2074f20ce Mon Sep 17 00:00:00 2001 From: Kit Westneat Date: Fri, 21 Apr 2017 14:57:42 -0400 Subject: [PATCH] LU-8271 nodemap: wait before getting large conf if changed If a nodemap configuration spans multiple RPCs, it's possible for the nodemap config to change between RPCs. Previously, the MGC would immediately retry to get the nodemap config. This patch modifies the behavior so the nodemap config lock is readded to the wait queue, which will delay retrying by ~10s. Test-Parameters: envdefinitions=SLOW=yes \ testlist=sanity-sec,sanity-sec,sanity-sec Signed-off-by: Kit Westneat Change-Id: Ie4e70def712e5eaa38adecc450e39c0380e34b69 Reviewed-on: https://review.whamcloud.com/26781 Reviewed-by: Andreas Dilger Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Emoly Liu Reviewed-by: Oleg Drokin --- lustre/mgc/mgc_request.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c index c08ed96..bccef43 100644 --- a/lustre/mgc/mgc_request.c +++ b/lustre/mgc/mgc_request.c @@ -1753,15 +1753,8 @@ again: #ifdef HAVE_SERVER_SUPPORT /* config changed since first read RPC */ if (cld_is_nodemap(cld) && config_read_offset == 0) { - recent_nodemap = NULL; - nodemap_config_dealloc(new_config); - new_config = NULL; - CDEBUG(D_INFO, "nodemap config changed in transit, retrying\n"); - - /* setting eof to false, we request config again */ - eof = false; - GOTO(out, rc = 0); + GOTO(out, rc = -EAGAIN); } #endif if (!eof) @@ -2159,6 +2152,12 @@ restart: CERROR("Can't drop cfg lock: %d\n", rcl); } + /* requeue nodemap lock immediately if transfer was interrupted */ + if (cld_is_nodemap(cld) && rc == -EAGAIN) { + mgc_requeue_add(cld); + rc = 0; + } + RETURN(rc); } -- 1.8.3.1