Whamcloud - gitweb
b=21411 Avoid infinite loop when bulk IO delayed.
authoryangsheng <sheng.yang@sun.com>
Thu, 17 Dec 2009 17:25:19 +0000 (01:25 +0800)
committerjohann <johann@granier.local>
Fri, 18 Dec 2009 14:29:49 +0000 (15:29 +0100)
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
lustre/tests/recovery-small.sh

index 66b656a..3608d06 100644 (file)
@@ -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) */
index 6bdfe02..dbe4f4f 100755 (executable)
@@ -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