From: braam Date: Thu, 21 Mar 2002 01:50:34 +0000 (+0000) Subject: - do the right thing when we catch SIGTERM X-Git-Tag: 0.4.2~509 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=1dc80455ee48f4fa79a8061c189eeea1d3301788;p=fs%2Flustre-release.git - do the right thing when we catch SIGTERM - removed extraneous MDUnlink - added CERRORs to catch MD leak --- diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index f41187d..462982f 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -181,6 +181,7 @@ static int ptlrpc_check_reply(struct ptlrpc_request *req) } if (sigismember(&(current->pending.signal), SIGKILL) || + sigismember(&(current->pending.signal), SIGTERM) || sigismember(&(current->pending.signal), SIGSTOP) || sigismember(&(current->pending.signal), SIGINT)) { req->rq_flags = PTL_RPC_INTR; @@ -231,11 +232,10 @@ int ptlrpc_check_status(struct ptlrpc_request *req, int err) /* Abort this request and cleanup any resources associated with it. */ int ptlrpc_abort(struct ptlrpc_request *request) { - /* First remove the MD for the reply; in theory, this means + /* First remove the ME for the reply; in theory, this means * that we can tear down the buffer safely. */ //spin_lock(&request->rq_lock); PtlMEUnlink(request->rq_reply_me_h); - PtlMDUnlink(request->rq_reply_md_h); OBD_FREE(request->rq_repbuf, request->rq_replen); request->rq_repbuf = NULL; request->rq_replen = 0; diff --git a/lustre/ptlrpc/niobuf.c b/lustre/ptlrpc/niobuf.c index 3e31957..3ff18c8 100644 --- a/lustre/ptlrpc/niobuf.c +++ b/lustre/ptlrpc/niobuf.c @@ -92,6 +92,7 @@ int ptl_send_buf(struct ptlrpc_request *request, struct lustre_peer *peer, request->rq_req_md.user_ptr = request; rc = PtlMDBind(peer->peer_ni, request->rq_req_md, &md_h); + CERROR("MDBind (outgoing req/rep/bulk): %Lu\n", (__u64)md_h); if (rc != 0) { CERROR("PtlMDBind failed: %d\n", rc); BUG(); @@ -177,6 +178,7 @@ int ptlrpc_register_bulk(struct ptlrpc_bulk_desc *bulk) bulk->b_md.eventq = bulk_sink_eq; rc = PtlMDAttach(bulk->b_me_h, bulk->b_md, PTL_UNLINK, &bulk->b_md_h); + CERROR("MDAttach (bulk sink): %Lu\n", (__u64)bulk->b_md_h); if (rc != PTL_OK) { CERROR("PtlMDAttach failed: %d\n", rc); BUG(); @@ -315,6 +317,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, struct lustre_peer *peer) rc = PtlMDAttach(request->rq_reply_me_h, request->rq_reply_md, PTL_UNLINK, &request->rq_reply_md_h); + CERROR("MDAttach (send RPC): %Lu\n", (__u64)request->rq_reply_md_h); if (rc != PTL_OK) { CERROR("PtlMDAttach failed: %d\n", rc); BUG(); @@ -387,6 +390,8 @@ int ptl_handled_rpc(struct ptlrpc_service *service, void *start) rc = PtlMDAttach(service->srv_me_h[index], service->srv_md[index], PTL_RETAIN, &(service->srv_md_h[index])); + CERROR("MDAttach (request MDs): %Lu\n", + (__u64)(service->srv_md_h[index])); CDEBUG(D_INFO, "Attach MD in ring, rc %d\n", rc); if (rc != PTL_OK) {