diff options
Diffstat (limited to 'drivers/staging/lustre/lnet/selftest')
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/conrpc.c | 3 | ||||
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/console.c | 24 | ||||
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/rpc.c | 3 | ||||
-rw-r--r-- | drivers/staging/lustre/lnet/selftest/selftest.h | 6 |
4 files changed, 21 insertions, 15 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c b/drivers/staging/lustre/lnet/selftest/conrpc.c index 53d5892..8d1eea4 100644 --- a/drivers/staging/lustre/lnet/selftest/conrpc.c +++ b/drivers/staging/lustre/lnet/selftest/conrpc.c @@ -1346,7 +1346,8 @@ lstcon_rpc_cleanup_wait(void) mutex_unlock(&console_session.ses_mutex); CWARN("Session is shutting down, waiting for termination of transactions\n"); - cfs_pause(cfs_time_seconds(1)); + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(cfs_time_seconds(1)); mutex_lock(&console_session.ses_mutex); } diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c index 2a8eddc..352fc96 100644 --- a/drivers/staging/lustre/lnet/selftest/console.c +++ b/drivers/staging/lustre/lnet/selftest/console.c @@ -61,7 +61,7 @@ do { \ lstcon_session_t console_session; -void +static void lstcon_node_get(lstcon_node_t *nd) { LASSERT (nd->nd_ref >= 1); @@ -114,7 +114,7 @@ lstcon_node_find(lnet_process_id_t id, lstcon_node_t **ndpp, int create) return 0; } -void +static void lstcon_node_put(lstcon_node_t *nd) { lstcon_ndlink_t *ndl; @@ -344,7 +344,7 @@ lstcon_group_move(lstcon_group_t *old, lstcon_group_t *new) } } -int +static int lstcon_sesrpc_condition(int transop, lstcon_node_t *nd, void *arg) { lstcon_group_t *grp = (lstcon_group_t *)arg; @@ -373,7 +373,7 @@ lstcon_sesrpc_condition(int transop, lstcon_node_t *nd, void *arg) return 1; } -int +static int lstcon_sesrpc_readent(int transop, srpc_msg_t *msg, lstcon_rpc_ent_t *ent_up) { @@ -830,7 +830,7 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t *gents_p, return 0; } -int +static int lstcon_batch_find(const char *name, lstcon_batch_t **batpp) { lstcon_batch_t *bat; @@ -998,7 +998,7 @@ lstcon_batch_info(char *name, lstcon_test_batch_ent_t *ent_up, int server, return rc; } -int +static int lstcon_batrpc_condition(int transop, lstcon_node_t *nd, void *arg) { switch (transop) { @@ -1141,7 +1141,7 @@ lstcon_batch_destroy(lstcon_batch_t *bat) LIBCFS_FREE(bat, sizeof(lstcon_batch_t)); } -int +static int lstcon_testrpc_condition(int transop, lstcon_node_t *nd, void *arg) { lstcon_test_t *test; @@ -1370,7 +1370,7 @@ out: return rc; } -int +static int lstcon_test_find(lstcon_batch_t *batch, int idx, lstcon_test_t **testpp) { lstcon_test_t *test; @@ -1385,7 +1385,7 @@ lstcon_test_find(lstcon_batch_t *batch, int idx, lstcon_test_t **testpp) return -ENOENT; } -int +static int lstcon_tsbrpc_readent(int transop, srpc_msg_t *msg, lstcon_rpc_ent_t *ent_up) { @@ -1464,7 +1464,7 @@ lstcon_test_batch_query(char *name, int testidx, int client, return rc; } -int +static int lstcon_statrpc_readent(int transop, srpc_msg_t *msg, lstcon_rpc_ent_t *ent_up) { @@ -1488,7 +1488,7 @@ lstcon_statrpc_readent(int transop, srpc_msg_t *msg, return 0; } -int +static int lstcon_ndlist_stat(struct list_head *ndlist, int timeout, struct list_head *result_up) { @@ -1577,7 +1577,7 @@ lstcon_nodes_stat(int count, lnet_process_id_t *ids_up, return rc; } -int +static int lstcon_debug_ndlist(struct list_head *ndlist, struct list_head *translist, int timeout, struct list_head *result_up) diff --git a/drivers/staging/lustre/lnet/selftest/rpc.c b/drivers/staging/lustre/lnet/selftest/rpc.c index d838985..9fc0429 100644 --- a/drivers/staging/lustre/lnet/selftest/rpc.c +++ b/drivers/staging/lustre/lnet/selftest/rpc.c @@ -1585,7 +1585,8 @@ srpc_startup (void) spin_lock_init(&srpc_data.rpc_glock); /* 1 second pause to avoid timestamp reuse */ - cfs_pause(cfs_time_seconds(1)); + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(cfs_time_seconds(1)); srpc_data.rpc_matchbits = ((__u64) cfs_time_current_sec()) << 48; srpc_data.rpc_state = SRPC_STATE_NONE; diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h b/drivers/staging/lustre/lnet/selftest/selftest.h index 228927e..f4806a6 100644 --- a/drivers/staging/lustre/lnet/selftest/selftest.h +++ b/drivers/staging/lustre/lnet/selftest/selftest.h @@ -572,7 +572,11 @@ swi_state2str (int state) #undef STATE2STR } -#define selftest_wait_events() cfs_pause(cfs_time_seconds(1) / 10) +#define selftest_wait_events() \ + do { \ + set_current_state(TASK_UNINTERRUPTIBLE); \ + schedule_timeout(cfs_time_seconds(1) / 10); \ + } while (0) #define lst_wait_until(cond, lock, fmt, ...) \ |