X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lnet%2Flnet%2Fapi-ni.c;h=aa752f82dad2bd4caba84e7a2d91d5a5fe3dcb73;hp=8d318cd0d6aeca3e0a9db168b166326f9d9e16dd;hb=2d12c156398a93a23d1280334ab1b95b8e00e2f6;hpb=e1526ef2b8446fbd9a5f8f8d6f2d5e02d1982a75 diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 8d318cd..aa752f8 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -69,10 +69,10 @@ MODULE_PARM_DESC(lnet_numa_range, /* * This sequence number keeps track of how many times DLC was used to - * update the configuration. It is incremented on any DLC update and - * checked when sending a message to determine if there is a need to - * re-run the selection algorithm to handle configuration change. - * Look at lnet_select_pathway() for more details on its usage. + * update the local NIs. It is incremented when a NI is added or + * removed and checked when sending a message to determine if there is + * a need to re-run the selection algorithm. See lnet_select_pathway() + * for more details on its usage. */ static atomic_t lnet_dlc_seq_no = ATOMIC_INIT(0); @@ -1292,6 +1292,7 @@ lnet_shutdown_lndni(struct lnet_ni *ni) lnet_net_lock(LNET_LOCK_EX); ni->ni_state = LNET_NI_STATE_DELETING; lnet_ni_unlink_locked(ni); + lnet_incr_dlc_seq(); lnet_net_unlock(LNET_LOCK_EX); /* clear messages for this NI on the lazy portal */ @@ -2804,7 +2805,6 @@ LNetCtl(unsigned int cmd, void *arg) return -EINVAL; mutex_lock(&the_lnet.ln_api_mutex); - lnet_incr_dlc_seq(); rc = lnet_add_peer_ni_to_peer(cfg->prcfg_key_nid, cfg->prcfg_cfg_nid, cfg->prcfg_mr); @@ -2819,7 +2819,6 @@ LNetCtl(unsigned int cmd, void *arg) return -EINVAL; mutex_lock(&the_lnet.ln_api_mutex); - lnet_incr_dlc_seq(); rc = lnet_del_peer_ni_from_peer(cfg->prcfg_key_nid, cfg->prcfg_cfg_nid); mutex_unlock(&the_lnet.ln_api_mutex);