do not send destroy notification for reverse ctx.
b=20040
r=fanyong
r=wangdi
void sptlrpc_import_sec_put(struct obd_import *imp);
int sptlrpc_import_check_ctx(struct obd_import *imp);
-void sptlrpc_import_inval_all_ctx(struct obd_import *imp);
void sptlrpc_import_flush_root_ctx(struct obd_import *imp);
void sptlrpc_import_flush_my_ctx(struct obd_import *imp);
void sptlrpc_import_flush_all_ctx(struct obd_import *imp);
obd_set_info_async(export, sizeof(KEY_REVIMP_UPD),
KEY_REVIMP_UPD, 0, NULL, NULL);
- /* in some recovery senarios, previous ctx init rpc handled
- * in sptlrpc_target_export_check() might be used to install
- * a reverse ctx in this reverse import, and later OBD_CONNECT
- * using the same gss ctx could reach here and following new
- * reverse import. note all reverse ctx in new/old import are
- * actually based on the same gss ctx. so we invalidate ctx
- * here before destroy import, otherwise flush old import will
- * lead to remote reverse ctx be destroied, thus the reverse
- * ctx of new import will lost its peer.
- * there might be a better way to deal with this???
- */
- sptlrpc_import_inval_all_ctx(export->exp_imp_reverse);
-
client_destroy_import(export->exp_imp_reverse);
}
LASSERT(atomic_read(&ctx->cc_refcount) == 0);
LASSERT(ctx->cc_sec == sec);
+ /*
+ * remove UPTODATE flag of reverse ctx thus we won't send fini rpc,
+ * this is to avoid potential problems of client side reverse svc ctx
+ * be mis-destroyed in various recovery senarios. anyway client can
+ * manage its reverse ctx well by associating it with its buddy ctx.
+ */
+ if (sec_is_reverse(sec))
+ ctx->cc_flags &= ~PTLRPC_CTX_UPTODATE;
+
if (gctx->gc_mechctx) {
/* the final context fini rpc will use this ctx too, and it's
* asynchronous which finished by request_out_callback(). so
sptlrpc_sec_put(sec);
}
-void sptlrpc_import_inval_all_ctx(struct obd_import *imp)
-{
- /* use grace == 0 */
- import_flush_ctx_common(imp, -1, 0, 1);
-}
-
void sptlrpc_import_flush_root_ctx(struct obd_import *imp)
{
/* it's important to use grace mode, see explain in