From affd9c6d1531e7a02f726c62169d106abc391a49 Mon Sep 17 00:00:00 2001 From: yury Date: Wed, 12 Nov 2008 11:59:51 +0000 Subject: [PATCH] b=17037 r=tappro,wangdi - fixes ost cleanup issue due to missed llcd_put() in the case ost does not receive disconnect from mds; - do not sleep on hanging llcd. Instead assert on it _after_ stopping recov_thread's ptlrpcd which should kill any remeining llcds; - fixes and cleanups, comments. --- lustre/ptlrpc/client.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index 450a917..4cb3fec 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -517,7 +517,7 @@ static struct ptlrpc_request *ptlrpc_prep_req_from_pool(struct ptlrpc_request_po request = list_entry(pool->prp_req_list.next, struct ptlrpc_request, rq_list); - list_del(&request->rq_list); + list_del_init(&request->rq_list); spin_unlock(&pool->prp_lock); LASSERT(request->rq_reqmsg); @@ -1008,9 +1008,9 @@ static int ptlrpc_send_new_req(struct ptlrpc_request *req) req->rq_import_generation = imp->imp_generation; if (ptlrpc_import_delay_req(imp, req, &rc)) { - spin_lock (&req->rq_lock); + spin_lock(&req->rq_lock); req->rq_waiting = 1; - spin_unlock (&req->rq_lock); + spin_unlock(&req->rq_lock); DEBUG_REQ(D_HA, req, "req from PID %d waiting for recovery: " "(%s != %s)", lustre_msg_get_status(req->rq_reqmsg), @@ -1954,7 +1954,7 @@ int ptlrpc_queue_wait(struct ptlrpc_request *req) req->rq_import_generation = imp->imp_generation; restart: if (ptlrpc_import_delay_req(imp, req, &rc)) { - list_del(&req->rq_list); + list_del_init(&req->rq_list); list_add_tail(&req->rq_list, &imp->imp_delayed_list); atomic_inc(&imp->imp_inflight); spin_unlock(&imp->imp_lock); -- 1.8.3.1