From: shaver Date: Fri, 11 Oct 2002 06:33:51 +0000 (+0000) Subject: Send the correct (I think) client-LDLM export address when reconnecting. X-Git-Tag: v1_7_100~4545 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=9b3c3ccd736930af497398305f0e6186a88a635b Send the correct (I think) client-LDLM export address when reconnecting. I will now write 100 times on my whiteboard: reuse client_obd_connect. --- diff --git a/lustre/ptlrpc/recover.c b/lustre/ptlrpc/recover.c index 4717c2a..ef91aad 100644 --- a/lustre/ptlrpc/recover.c +++ b/lustre/ptlrpc/recover.c @@ -25,7 +25,6 @@ int ll_reconnect(struct ptlrpc_connection *conn) { - struct ptlrpc_request *request; struct list_head *tmp; int rc = -EINVAL; @@ -44,14 +43,24 @@ int ll_reconnect(struct ptlrpc_connection *conn) sizeof(obd->obd_uuid) }; char *tmp[] = {cli->cl_target_uuid, obd->obd_uuid }; struct lustre_handle old_hdl; + struct ptlrpc_request *request; + struct obd_export *ldlmexp; LASSERT(imp->imp_connection == conn); request = ptlrpc_prep_req(imp, rq_opc, 2, size, tmp); request->rq_level = LUSTRE_CONN_NEW; request->rq_replen = lustre_msg_size(0, NULL); - /* XXX are (addr, cookie) right? */ - request->rq_reqmsg->addr = imp->imp_handle.addr; - request->rq_reqmsg->cookie = imp->imp_handle.cookie; + /* + * This address is the export that represents our client-side + * LDLM service (for ASTs). We should only have one on this + * list, so we just grab the first one. + * + * XXX tear down export, call class_obd_connect! + */ + ldlmexp = list_entry(obd->obd_exports.next, struct obd_export, + exp_obd_chain); + request->rq_reqmsg->addr = (__u64)(unsigned long)ldlmexp; + request->rq_reqmsg->cookie = ldlmexp->exp_cookie; rc = ptlrpc_queue_wait(request); rc = ptlrpc_check_status(request, rc); if (rc) {