From 22205d30d0cab275fe08da973ed22b9ba2d9c3b5 Mon Sep 17 00:00:00 2001 From: wangdi <wangdi> Date: Fri, 20 Jul 2007 03:18:32 +0000 Subject: [PATCH] Branch:b1_6 b=11190 reply intent enqueue error by rq_status i=adilger i-nathan --- lustre/ChangeLog | 8 ++++++++ lustre/ldlm/ldlm_lockd.c | 3 +-- lustre/mdc/mdc_locks.c | 2 -- lustre/mds/handler.c | 5 +++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 4bc4d0ae6f..706530ebd9 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -540,6 +540,14 @@ Details : Hash tables noticeably help when a lot of clients connect to a server, to faster identify duplicate connections or reconnects, also to faster find export to evict in manual eviction case. +Severity : normal +Bugzilla : 11190 +Description: Sometimes, when the server evict a client, and the client will + not be evicted as soon as possible. +Details : In enqueue req, the error was returned by intent, instead of + rq_status which make ptlrpc layer not detect this error, and + does not evict the client. So enqueue error should be returned + by rq_status. -------------------------------------------------------------------------------- diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index c582e350d5..f4fe21912a 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -1004,12 +1004,11 @@ existing_lock: EXIT; out: - req->rq_status = err; + req->rq_status = rc ?: err; /* return either error - bug 11190 */ if (req->rq_reply_state == NULL) { err = lustre_pack_reply(req, 1, NULL, NULL); if (rc == 0) rc = err; - req->rq_status = rc; } /* The LOCK_CHANGED code in ldlm_lock_enqueue depends on this diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index f101e0d044..7962b0ae4a 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -412,8 +412,6 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, lockreq->lock_flags |= LDLM_FL_INTENT_ONLY; } - /* This can go when we're sure that this can never happen */ - LASSERT(rc != -ENOENT); if (rc == ELDLM_LOCK_ABORTED) { einfo->ei_mode = 0; memset(lockh, 0, sizeof(*lockh)); diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 2477d580c5..de9aa4b956 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -2399,8 +2399,9 @@ static int mds_intent_policy(struct ldlm_namespace *ns, /* If there was an error of some sort or if we are not * returning any locks */ - if (rep->lock_policy_res2 || - !intent_disposition(rep, DISP_OPEN_LOCK)) + if (rep->lock_policy_res2) + RETURN(rep->lock_policy_res2); + if (!intent_disposition(rep, DISP_OPEN_LOCK)) RETURN(ELDLM_LOCK_ABORTED); break; case IT_LOOKUP: -- GitLab