From 58ab8b926eadd3f706ef317f5d7bb9a1efc83663 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Fri, 18 Dec 2009 01:25:19 +0800 Subject: [PATCH] b=21411 Avoid infinite loop when bulk IO delayed. The rq_deadline calculated base on cfs_time_current_sec() when AT enabled, So the early reply always send between client&server. And the request never be timeout in some case. i=nathan i=johann --- lustre/ptlrpc/service.c | 4 +++- lustre/tests/recovery-small.sh | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index 66b656a..3608d06 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -756,12 +756,14 @@ static int ptlrpc_at_send_early_reply(struct ptlrpc_request *req) at_add(&svc->srv_at_estimate, min(at_extra, req->rq_export->exp_obd->obd_recovery_timeout / 4)); + newdl = cfs_time_current_sec(); } else { /* Fake our processing time into the future to ask the * clients for some extra amount of time */ at_add(&svc->srv_at_estimate, at_extra); + newdl = req->rq_arrival_time.tv_sec; } - newdl = cfs_time_current_sec() + at_get(&svc->srv_at_estimate); + newdl += at_get(&svc->srv_at_estimate); if (req->rq_deadline >= newdl) { /* We're not adding any time, no need to send an early reply (e.g. maybe at adaptive_max) */ diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh index 6bdfe02..dbe4f4f 100755 --- a/lustre/tests/recovery-small.sh +++ b/lustre/tests/recovery-small.sh @@ -228,7 +228,7 @@ test_17() { # OBD_FAIL_PTLRPC_BULK_GET_NET 0x0503 | OBD_FAIL_ONCE # OST bulk will time out here, client retries - do_facet ost1 lctl set_param fail_loc=0x80000503 + do_facet client lctl set_param fail_loc=0x80000503 # need to ensure we send an RPC do_facet client cp $SAMPLE_FILE $DIR/$tfile sync -- 1.8.3.1