From 69b32e0779f0dacd4efc9a4cc4ef56a1a718d362 Mon Sep 17 00:00:00 2001 From: yury <yury> Date: Wed, 12 Nov 2008 19:32:36 +0000 Subject: [PATCH] b=17310 r=shadow,vitaly - check rq_phase correctly in ptlrpc_expired_set() and couple of other places. --- lustre/ptlrpc/client.c | 16 ++-------------- lustre/ptlrpc/import.c | 5 ++--- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index cbfcc5b11d..165dd29bcf 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -1521,8 +1521,7 @@ int ptlrpc_expired_set(void *data) list_entry(tmp, struct ptlrpc_request, rq_set_chain); /* Request in-flight? */ - if (!((req->rq_phase & - (RQ_PHASE_RPC | RQ_PHASE_UNREGISTERING) && + if (!((req->rq_phase == RQ_PHASE_RPC && !req->rq_waiting && !req->rq_resend) || (req->rq_phase == RQ_PHASE_BULK))) continue; @@ -1591,22 +1590,11 @@ int ptlrpc_set_next_timeout(struct ptlrpc_request_set *set) /* * Request in-flight? */ - if (!(((req->rq_phase & - (RQ_PHASE_RPC | RQ_PHASE_UNREGISTERING)) && - !req->rq_waiting) || + if (!(((req->rq_phase == RQ_PHASE_RPC) && !req->rq_waiting) || (req->rq_phase == RQ_PHASE_BULK) || (req->rq_phase == RQ_PHASE_NEW))) continue; - /* - * Check those waiting for long reply unlink every one - * second. - */ - if (req->rq_phase == RQ_PHASE_UNREGISTERING) { - timeout = 1; - break; - } - /* * Already timed out. */ diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index 4ffa92c963..80e0aafb44 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -212,9 +212,8 @@ ptlrpc_inflight_deadline(struct ptlrpc_request *req, time_t now) { long dl; - if (!(((req->rq_phase & (RQ_PHASE_RPC | RQ_PHASE_UNREGISTERING)) && - !req->rq_waiting) || - (req->rq_phase == RQ_PHASE_BULK) || + if (!(((req->rq_phase == RQ_PHASE_RPC) && !req->rq_waiting) || + (req->rq_phase == RQ_PHASE_BULK) || (req->rq_phase == RQ_PHASE_NEW))) return 0; -- GitLab