diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 4bc4d0ae6f07bfd354d5210051d1d39b33b2c683..706530ebd95edb9795f6319733b5ee8ab59d4a6f 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 c582e350d53a561f6db879899519f19b89c6f52f..f4fe21912a0ba63429a5cfa467c4658ca589a365 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 f101e0d04406dee19843683a571115a6aa585a12..7962b0ae4aab164e7d68b7b3561c858d26ab1532 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 2477d580c55352ede703e7fc7d03f1e9ce918fa0..de9aa4b956c5530244da9f1949c3c88ccc3098b3 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: