Whamcloud - gitweb
LU-700 osc: Tally BRW_{READ,WRITE}_BYTES by bytes transferred.
authorJohn Hammond <jhammond@tacc.utexas.edu>
Wed, 21 Sep 2011 19:00:39 +0000 (14:00 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 28 Oct 2011 16:56:09 +0000 (12:56 -0400)
Call ptlrpc_lprocfs_brw() in brw_interpret() rather than
osc_send_oap_rpc() and tally by the number of bytes transferred rather
than the number requested.

Change-Id: Ia7191972d9671f01d942a46eba069191f130f516
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Reviewed-on: http://review.whamcloud.com/1402
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jay@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osc/osc_request.c

index b9499b0..887275b 100644 (file)
@@ -2279,6 +2279,7 @@ static int brw_interpret(const struct lu_env *env,
                 cl_req_completion(env, aa->aa_clerq, rc < 0 ? rc :
                                   req->rq_bulk->bd_nob_transferred);
         osc_release_ppga(aa->aa_ppga, aa->aa_page_count);
                 cl_req_completion(env, aa->aa_clerq, rc < 0 ? rc :
                                   req->rq_bulk->bd_nob_transferred);
         osc_release_ppga(aa->aa_ppga, aa->aa_page_count);
+        ptlrpc_lprocfs_brw(req, req->rq_bulk->bd_nob_transferred);
 
         RETURN(rc);
 }
 
         RETURN(rc);
 }
@@ -2642,7 +2643,6 @@ osc_send_oap_rpc(const struct lu_env *env, struct client_obd *cli,
                 lprocfs_oh_tally_log2(&cli->cl_write_offset_hist,
                                       (starting_offset >> CFS_PAGE_SHIFT) + 1);
         }
                 lprocfs_oh_tally_log2(&cli->cl_write_offset_hist,
                                       (starting_offset >> CFS_PAGE_SHIFT) + 1);
         }
-        ptlrpc_lprocfs_brw(req, aa->aa_requested_nob);
 
         client_obd_list_lock(&cli->cl_loi_list_lock);
 
 
         client_obd_list_lock(&cli->cl_loi_list_lock);