Whamcloud - gitweb
LU-3319 procfs: update shared server side core proc handling to seq_files
[fs/lustre-release.git] / lnet / selftest / brw_test.c
index f905c0c..25d94cb 100644 (file)
@@ -131,22 +131,21 @@ brw_client_init (sfw_test_instance_t *tsi)
 #define BRW_MAGIC       0xeeb0eeb1eeb2eeb3ULL
 #define BRW_MSIZE       sizeof(__u64)
 
-int
-brw_inject_one_error (void)
+int brw_inject_one_error (void)
 {
-        struct timeval tv;
+       struct timeval tv;
 
-        if (brw_inject_errors <= 0) return 0;
+       if (brw_inject_errors <= 0) return 0;
 
 #ifndef __KERNEL__
-        gettimeofday(&tv, NULL);
+       gettimeofday(&tv, NULL);
 #else
-        cfs_gettimeofday(&tv);
+       do_gettimeofday(&tv);
 #endif
 
-        if ((tv.tv_usec & 1) == 0) return 0;
+       if ((tv.tv_usec & 1) == 0) return 0;
 
-        return brw_inject_errors--;
+       return brw_inject_errors--;
 }
 
 void
@@ -333,7 +332,7 @@ brw_client_done_rpc (sfw_test_unit_t *tsu, srpc_client_rpc_t *rpc)
                 CERROR ("BRW RPC to %s failed with %d\n",
                         libcfs_id2str(rpc->crpc_dest), rpc->crpc_status);
                 if (!tsi->tsi_stopping) /* rpc could have been aborted */
-                        cfs_atomic_inc(&sn->sn_brw_errors);
+                       atomic_inc(&sn->sn_brw_errors);
                 goto out;
         }
 
@@ -347,7 +346,7 @@ brw_client_done_rpc (sfw_test_unit_t *tsu, srpc_client_rpc_t *rpc)
                 libcfs_id2str(rpc->crpc_dest), reply->brw_status);
 
         if (reply->brw_status != 0) {
-                cfs_atomic_inc(&sn->sn_brw_errors);
+               atomic_inc(&sn->sn_brw_errors);
                 rpc->crpc_status = -(int)reply->brw_status;
                 goto out;
         }
@@ -357,7 +356,7 @@ brw_client_done_rpc (sfw_test_unit_t *tsu, srpc_client_rpc_t *rpc)
         if (brw_check_bulk(&rpc->crpc_bulk, reqst->brw_flags, magic) != 0) {
                 CERROR ("Bulk data from %s is corrupted!\n",
                         libcfs_id2str(rpc->crpc_dest));
-                cfs_atomic_inc(&sn->sn_brw_errors);
+               atomic_inc(&sn->sn_brw_errors);
                 rpc->crpc_status = -EBADMSG;
         }