Whamcloud - gitweb
LU-9683 ptlrpc: fix argument misorder 27/28027/4
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Wed, 19 Jul 2017 04:59:13 +0000 (00:59 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 29 Jul 2017 00:03:08 +0000 (00:03 +0000)
involved in timediffs calculation.

Change-Id: Ib4a45dddb3866824b696aaeaa190f2ab9b1c71ac
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: https://review.whamcloud.com/28027
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/client.c
lustre/ptlrpc/service.c

index bac3301..4409de6 100644 (file)
@@ -1361,7 +1361,7 @@ static int after_reply(struct ptlrpc_request *req)
         }
 
        work_start = ktime_get_real();
         }
 
        work_start = ktime_get_real();
-       timediff = ktime_us_delta(req->rq_sent_ns, work_start);
+       timediff = ktime_us_delta(work_start, req->rq_sent_ns);
 
         /*
          * NB Until this point, the whole of the incoming message,
 
         /*
          * NB Until this point, the whole of the incoming message,
index 9e18d97..ecde6ab 100644 (file)
@@ -2055,7 +2055,7 @@ ptlrpc_server_handle_request(struct ptlrpc_service_part *svcpt,
 
        work_start = ktime_get_real();
        arrived = timespec64_to_ktime(request->rq_arrival_time);
 
        work_start = ktime_get_real();
        arrived = timespec64_to_ktime(request->rq_arrival_time);
-       timediff_usecs = ktime_us_delta(arrived, work_start);
+       timediff_usecs = ktime_us_delta(work_start, arrived);
        if (likely(svc->srv_stats != NULL)) {
                 lprocfs_counter_add(svc->srv_stats, PTLRPC_REQWAIT_CNTR,
                                    timediff_usecs);
        if (likely(svc->srv_stats != NULL)) {
                 lprocfs_counter_add(svc->srv_stats, PTLRPC_REQWAIT_CNTR,
                                    timediff_usecs);