Skip to content

Commit

Permalink
staging: lustre: filter remaining extra spacing for lnet selftest
Browse files Browse the repository at this point in the history
This patch is a result of a filter applied to the lnet selftest
code to remove the last bits of hidden white spaces.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
James Simmons authored and Greg Kroah-Hartman committed Mar 12, 2016
1 parent ec436b9 commit b794d79
Show file tree
Hide file tree
Showing 13 changed files with 370 additions and 370 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/lustre/lnet/selftest/brw_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ brw_client_init(sfw_test_instance_t *tsi)
return 0;
}

#define BRW_POISON 0xbeefbeefbeefbeefULL
#define BRW_MAGIC 0xeeb0eeb1eeb2eeb3ULL
#define BRW_MSIZE sizeof(__u64)
#define BRW_POISON 0xbeefbeefbeefbeefULL
#define BRW_MAGIC 0xeeb0eeb1eeb2eeb3ULL
#define BRW_MSIZE sizeof(__u64)

static int
brw_inject_one_error(void)
Expand Down
10 changes: 5 additions & 5 deletions drivers/staging/lustre/lnet/selftest/conctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ lst_session_info_ioctl(lstio_session_info_args_t *args)
!args->lstio_ses_featp || /* address for output features */
!args->lstio_ses_ndinfo || /* address for output ndinfo */
!args->lstio_ses_namep || /* address for output name */
args->lstio_ses_nmlen <= 0 ||
args->lstio_ses_nmlen <= 0 ||
args->lstio_ses_nmlen > LST_NAME_SIZE)
return -EINVAL;

Expand Down Expand Up @@ -297,7 +297,7 @@ lst_group_update_ioctl(lstio_group_update_args_t *args)
break;

case LST_GROUP_RMND:
if (args->lstio_grp_count <= 0 ||
if (args->lstio_grp_count <= 0 ||
!args->lstio_grp_idsp) {
rc = -EINVAL;
break;
Expand Down Expand Up @@ -368,7 +368,7 @@ lst_group_list_ioctl(lstio_group_list_args_t *args)
if (args->lstio_grp_key != console_session.ses_key)
return -EACCES;

if (args->lstio_grp_idx < 0 ||
if (args->lstio_grp_idx < 0 ||
!args->lstio_grp_namep ||
args->lstio_grp_nmlen <= 0 ||
args->lstio_grp_nmlen > LST_NAME_SIZE)
Expand Down Expand Up @@ -591,7 +591,7 @@ lst_batch_list_ioctl(lstio_batch_list_args_t *args)
if (args->lstio_bat_key != console_session.ses_key)
return -EACCES;

if (args->lstio_bat_idx < 0 ||
if (args->lstio_bat_idx < 0 ||
!args->lstio_bat_namep ||
args->lstio_bat_nmlen <= 0 ||
args->lstio_bat_nmlen > LST_NAME_SIZE)
Expand Down Expand Up @@ -755,7 +755,7 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
goto out;

LIBCFS_ALLOC(dst_name, args->lstio_tes_dgrp_nmlen + 1);
if (!dst_name)
if (!dst_name)
goto out;

if (args->lstio_tes_param) {
Expand Down
58 changes: 29 additions & 29 deletions drivers/staging/lustre/lnet/selftest/conrpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,59 +51,59 @@
#include "selftest.h"

/* Console rpc and rpc transaction */
#define LST_TRANS_TIMEOUT 30
#define LST_TRANS_MIN_TIMEOUT 3
#define LST_TRANS_TIMEOUT 30
#define LST_TRANS_MIN_TIMEOUT 3

#define LST_VALIDATE_TIMEOUT(t) min(max(t, LST_TRANS_MIN_TIMEOUT), LST_TRANS_TIMEOUT)

#define LST_PING_INTERVAL 8
#define LST_PING_INTERVAL 8

struct lstcon_rpc_trans;
struct lstcon_tsb_hdr;
struct lstcon_test;
struct lstcon_node;

typedef struct lstcon_rpc {
struct list_head crp_link; /* chain on rpc transaction */
srpc_client_rpc_t *crp_rpc; /* client rpc */
struct lstcon_node *crp_node; /* destination node */
struct lstcon_rpc_trans *crp_trans; /* conrpc transaction */

unsigned int crp_posted:1; /* rpc is posted */
unsigned int crp_finished:1; /* rpc is finished */
unsigned int crp_unpacked:1; /* reply is unpacked */
struct list_head crp_link; /* chain on rpc transaction */
srpc_client_rpc_t *crp_rpc; /* client rpc */
struct lstcon_node *crp_node; /* destination node */
struct lstcon_rpc_trans *crp_trans; /* conrpc transaction */

unsigned int crp_posted:1; /* rpc is posted */
unsigned int crp_finished:1; /* rpc is finished */
unsigned int crp_unpacked:1; /* reply is unpacked */
/** RPC is embedded in other structure and can't free it */
unsigned int crp_embedded:1;
int crp_status; /* console rpc errors */
unsigned long crp_stamp; /* replied time stamp */
unsigned int crp_embedded:1;
int crp_status; /* console rpc errors */
unsigned long crp_stamp; /* replied time stamp */
} lstcon_rpc_t;

typedef struct lstcon_rpc_trans {
struct list_head tas_olink; /* link chain on owner list */
struct list_head tas_link; /* link chain on global list */
int tas_opc; /* operation code of transaction */
unsigned tas_feats_updated; /* features mask is uptodate */
unsigned tas_features; /* test features mask */
wait_queue_head_t tas_waitq; /* wait queue head */
atomic_t tas_remaining; /* # of un-scheduled rpcs */
struct list_head tas_olink; /* link chain on owner list */
struct list_head tas_link; /* link chain on global list */
int tas_opc; /* operation code of transaction */
unsigned tas_feats_updated; /* features mask is uptodate */
unsigned tas_features; /* test features mask */
wait_queue_head_t tas_waitq; /* wait queue head */
atomic_t tas_remaining; /* # of un-scheduled rpcs */
struct list_head tas_rpcs_list; /* queued requests */
} lstcon_rpc_trans_t;

#define LST_TRANS_PRIVATE 0x1000
#define LST_TRANS_PRIVATE 0x1000

#define LST_TRANS_SESNEW (LST_TRANS_PRIVATE | 0x01)
#define LST_TRANS_SESEND (LST_TRANS_PRIVATE | 0x02)
#define LST_TRANS_SESQRY 0x03
#define LST_TRANS_SESPING 0x04
#define LST_TRANS_SESPING 0x04

#define LST_TRANS_TSBCLIADD (LST_TRANS_PRIVATE | 0x11)
#define LST_TRANS_TSBSRVADD (LST_TRANS_PRIVATE | 0x12)
#define LST_TRANS_TSBCLIADD (LST_TRANS_PRIVATE | 0x11)
#define LST_TRANS_TSBSRVADD (LST_TRANS_PRIVATE | 0x12)
#define LST_TRANS_TSBRUN (LST_TRANS_PRIVATE | 0x13)
#define LST_TRANS_TSBSTOP (LST_TRANS_PRIVATE | 0x14)
#define LST_TRANS_TSBCLIQRY 0x15
#define LST_TRANS_TSBSRVQRY 0x16
#define LST_TRANS_TSBSTOP (LST_TRANS_PRIVATE | 0x14)
#define LST_TRANS_TSBCLIQRY 0x15
#define LST_TRANS_TSBSRVQRY 0x16

#define LST_TRANS_STATQRY 0x21
#define LST_TRANS_STATQRY 0x21

typedef int (*lstcon_rpc_cond_func_t)(int, struct lstcon_node *, void *);
typedef int (*lstcon_rpc_readent_func_t)(int, srpc_msg_t *,
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/lustre/lnet/selftest/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
do { \
if ((nd)->nd_state == LST_NODE_ACTIVE) \
(p)->nle_nactive++; \
else if ((nd)->nd_state == LST_NODE_BUSY) \
else if ((nd)->nd_state == LST_NODE_BUSY) \
(p)->nle_nbusy++; \
else if ((nd)->nd_state == LST_NODE_DOWN) \
else if ((nd)->nd_state == LST_NODE_DOWN) \
(p)->nle_ndown++; \
else \
(p)->nle_nunknown++; \
Expand Down Expand Up @@ -1690,7 +1690,7 @@ int
lstcon_session_match(lst_sid_t sid)
{
return (console_session.ses_id.ses_nid == sid.ses_nid &&
console_session.ses_id.ses_stamp == sid.ses_stamp) ? 1 : 0;
console_session.ses_id.ses_stamp == sid.ses_stamp) ? 1 : 0;
}

static void
Expand Down Expand Up @@ -1723,7 +1723,7 @@ lstcon_session_new(char *name, int key, unsigned feats,
rc = lstcon_session_end();

/* lstcon_session_end() only return local error */
if (rc)
if (rc)
return rc;
}

Expand Down
116 changes: 58 additions & 58 deletions drivers/staging/lustre/lnet/selftest/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,79 +52,79 @@

typedef struct lstcon_node {
lnet_process_id_t nd_id; /* id of the node */
int nd_ref; /* reference count */
int nd_state; /* state of the node */
int nd_timeout; /* session timeout */
unsigned long nd_stamp; /* timestamp of last replied RPC */
int nd_ref; /* reference count */
int nd_state; /* state of the node */
int nd_timeout; /* session timeout */
unsigned long nd_stamp; /* timestamp of last replied RPC */
struct lstcon_rpc nd_ping; /* ping rpc */
} lstcon_node_t; /* node descriptor */

typedef struct {
struct list_head ndl_link; /* chain on list */
struct list_head ndl_hlink; /* chain on hash */
lstcon_node_t *ndl_node; /* pointer to node */
lstcon_node_t *ndl_node; /* pointer to node */
} lstcon_ndlink_t; /* node link descriptor */

typedef struct {
struct list_head grp_link; /* chain on global group list
struct list_head grp_link; /* chain on global group list
*/
int grp_ref; /* reference count */
int grp_userland; /* has userland nodes */
int grp_nnode; /* # of nodes */
char grp_name[LST_NAME_SIZE]; /* group name */

struct list_head grp_trans_list; /* transaction list */
struct list_head grp_ndl_list; /* nodes list */
struct list_head grp_ndl_hash[0]; /* hash table for nodes */
int grp_ref; /* reference count */
int grp_userland; /* has userland nodes */
int grp_nnode; /* # of nodes */
char grp_name[LST_NAME_SIZE]; /* group name */

struct list_head grp_trans_list; /* transaction list */
struct list_head grp_ndl_list; /* nodes list */
struct list_head grp_ndl_hash[0]; /* hash table for nodes */
} lstcon_group_t; /* (alias of nodes) group descriptor */

#define LST_BATCH_IDLE 0xB0 /* idle batch */
#define LST_BATCH_IDLE 0xB0 /* idle batch */
#define LST_BATCH_RUNNING 0xB1 /* running batch */

typedef struct lstcon_tsb_hdr {
lst_bid_t tsb_id; /* batch ID */
int tsb_index; /* test index */
lst_bid_t tsb_id; /* batch ID */
int tsb_index; /* test index */
} lstcon_tsb_hdr_t;

typedef struct {
lstcon_tsb_hdr_t bat_hdr; /* test_batch header */
struct list_head bat_link; /* chain on session's batches list */
int bat_ntest; /* # of test */
int bat_state; /* state of the batch */
int bat_arg; /* parameter for run|stop, timeout
lstcon_tsb_hdr_t bat_hdr; /* test_batch header */
struct list_head bat_link; /* chain on session's batches list */
int bat_ntest; /* # of test */
int bat_state; /* state of the batch */
int bat_arg; /* parameter for run|stop, timeout
* for run, force for stop */
char bat_name[LST_NAME_SIZE];/* name of batch */
char bat_name[LST_NAME_SIZE];/* name of batch */

struct list_head bat_test_list; /* list head of tests (lstcon_test_t)
*/
struct list_head bat_trans_list; /* list head of transaction */
struct list_head bat_cli_list; /* list head of client nodes
struct list_head bat_cli_list; /* list head of client nodes
* (lstcon_node_t) */
struct list_head *bat_cli_hash; /* hash table of client nodes */
struct list_head bat_srv_list; /* list head of server nodes */
struct list_head bat_srv_list; /* list head of server nodes */
struct list_head *bat_srv_hash; /* hash table of server nodes */
} lstcon_batch_t; /* (tests ) batch descriptor */

typedef struct lstcon_test {
lstcon_tsb_hdr_t tes_hdr; /* test batch header */
struct list_head tes_link; /* chain on batch's tests list */
lstcon_batch_t *tes_batch; /* pointer to batch */

int tes_type; /* type of the test, i.e: bulk, ping */
int tes_stop_onerr; /* stop on error */
int tes_oneside; /* one-sided test */
int tes_concur; /* concurrency */
int tes_loop; /* loop count */
int tes_dist; /* nodes distribution of target group */
int tes_span; /* nodes span of target group */
int tes_cliidx; /* client index, used for RPC creating */
lstcon_tsb_hdr_t tes_hdr; /* test batch header */
struct list_head tes_link; /* chain on batch's tests list */
lstcon_batch_t *tes_batch; /* pointer to batch */

int tes_type; /* type of the test, i.e: bulk, ping */
int tes_stop_onerr; /* stop on error */
int tes_oneside; /* one-sided test */
int tes_concur; /* concurrency */
int tes_loop; /* loop count */
int tes_dist; /* nodes distribution of target group */
int tes_span; /* nodes span of target group */
int tes_cliidx; /* client index, used for RPC creating */

struct list_head tes_trans_list; /* transaction list */
lstcon_group_t *tes_src_grp; /* group run the test */
lstcon_group_t *tes_dst_grp; /* target group */
lstcon_group_t *tes_src_grp; /* group run the test */
lstcon_group_t *tes_dst_grp; /* target group */

int tes_paramlen; /* test parameter length */
char tes_param[0]; /* test parameter */
int tes_paramlen; /* test parameter length */
char tes_param[0]; /* test parameter */
} lstcon_test_t; /* a single test descriptor */

#define LST_GLOBAL_HASHSIZE 503 /* global nodes hash table size */
Expand All @@ -136,24 +136,24 @@ typedef struct lstcon_test {
#define LST_CONSOLE_TIMEOUT 300 /* default console timeout */

struct lstcon_session {
struct mutex ses_mutex; /* only 1 thread in session */
lst_sid_t ses_id; /* global session id */
int ses_key; /* local session key */
int ses_state; /* state of session */
int ses_timeout; /* timeout in seconds */
time64_t ses_laststamp; /* last operation stamp (seconds)
struct mutex ses_mutex; /* only 1 thread in session */
lst_sid_t ses_id; /* global session id */
int ses_key; /* local session key */
int ses_state; /* state of session */
int ses_timeout; /* timeout in seconds */
time64_t ses_laststamp; /* last operation stamp (seconds)
*/
unsigned ses_features; /* tests features of the session
unsigned ses_features; /* tests features of the session
*/
unsigned ses_feats_updated:1; /* features are synced with
unsigned ses_feats_updated:1; /* features are synced with
* remote test nodes */
unsigned ses_force:1; /* force creating */
unsigned ses_shutdown:1; /* session is shutting down */
unsigned ses_expired:1; /* console is timedout */
__u64 ses_id_cookie; /* batch id cookie */
char ses_name[LST_NAME_SIZE];/* session name */
lstcon_rpc_trans_t *ses_ping; /* session pinger */
struct stt_timer ses_ping_timer; /* timer for pinger */
unsigned ses_force:1; /* force creating */
unsigned ses_shutdown:1; /* session is shutting down */
unsigned ses_expired:1; /* console is timedout */
__u64 ses_id_cookie; /* batch id cookie */
char ses_name[LST_NAME_SIZE];/* session name */
lstcon_rpc_trans_t *ses_ping; /* session pinger */
struct stt_timer ses_ping_timer; /* timer for pinger */
lstcon_trans_stat_t ses_trans_stat; /* transaction stats */

struct list_head ses_trans_list; /* global list of transaction */
Expand All @@ -162,8 +162,8 @@ struct lstcon_session {
struct list_head ses_ndl_list; /* global list of nodes */
struct list_head *ses_ndl_hash; /* hash table of nodes */

spinlock_t ses_rpc_lock; /* serialize */
atomic_t ses_rpc_counter; /* # of initialized RPCs */
spinlock_t ses_rpc_lock; /* serialize */
atomic_t ses_rpc_counter; /* # of initialized RPCs */
struct list_head ses_rpc_freelist; /* idle console rpc */
}; /* session descriptor */

Expand Down
Loading

0 comments on commit b794d79

Please sign in to comment.