X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lnet%2Fselftest%2Fconrpc.h;h=2018911c74b45813ec600e811e2fd89fcfc34ff8;hb=eacdb3882896771f2fb48cf1940c24ce1d9cf094;hp=981b24979f8c2967c75eb42d150ae3e2ab953917;hpb=29e3c970f4ddc3f756dde2f46fcbda3456b0f200;p=fs%2Flustre-release.git diff --git a/lnet/selftest/conrpc.h b/lnet/selftest/conrpc.h index 981b249..2018911 100644 --- a/lnet/selftest/conrpc.h +++ b/lnet/selftest/conrpc.h @@ -27,7 +27,7 @@ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, Intel Corporation. + * Copyright (c) 2012, 2013, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -65,10 +65,10 @@ struct lstcon_test; struct lstcon_node; typedef struct lstcon_rpc { - cfs_list_t 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 */ + 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 */ @@ -80,16 +80,19 @@ typedef struct lstcon_rpc { } lstcon_rpc_t; typedef struct lstcon_rpc_trans { - cfs_list_t tas_olink; /* link chain on owner list */ - cfs_list_t tas_link; /* link chain on global list */ - int tas_opc; /* operation code of transaction */ + /* link chain on owner list */ + struct list_head tas_olink; + /* link chain on global list */ + struct list_head tas_link; + /* operation code of transaction */ + int tas_opc; /* features mask is uptodate */ - unsigned tas_feats_updated; + unsigned tas_feats_updated; /* test features mask */ - unsigned tas_features; - cfs_waitq_t tas_waitq; /* wait queue head */ - cfs_atomic_t tas_remaining; /* # of un-scheduled rpcs */ - cfs_list_t tas_rpcs_list; /* queued requests */ + unsigned tas_features; + 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 @@ -109,7 +112,8 @@ typedef struct lstcon_rpc_trans { #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 *, lstcon_rpc_ent_t *); +typedef int (*lstcon_rpc_readent_func_t)(int, srpc_msg_t *, + lstcon_rpc_ent_t __user *); int lstcon_sesrpc_prep(struct lstcon_node *nd, int transop, unsigned version, lstcon_rpc_t **crpc); @@ -122,17 +126,17 @@ int lstcon_testrpc_prep(struct lstcon_node *nd, int transop, unsigned version, int lstcon_statrpc_prep(struct lstcon_node *nd, unsigned version, lstcon_rpc_t **crpc); void lstcon_rpc_put(lstcon_rpc_t *crpc); -int lstcon_rpc_trans_prep(cfs_list_t *translist, - int transop, lstcon_rpc_trans_t **transpp); -int lstcon_rpc_trans_ndlist(cfs_list_t *ndlist, - cfs_list_t *translist, int transop, - void *arg, lstcon_rpc_cond_func_t condition, - lstcon_rpc_trans_t **transpp); +int lstcon_rpc_trans_prep(struct list_head *translist, + int transop, lstcon_rpc_trans_t **transpp); +int lstcon_rpc_trans_ndlist(struct list_head *ndlist, + struct list_head *translist, int transop, + void *arg, lstcon_rpc_cond_func_t condition, + lstcon_rpc_trans_t **transpp); void lstcon_rpc_trans_stat(lstcon_rpc_trans_t *trans, - lstcon_trans_stat_t *stat); + lstcon_trans_stat_t *stat); int lstcon_rpc_trans_interpreter(lstcon_rpc_trans_t *trans, - cfs_list_t *head_up, - lstcon_rpc_readent_func_t readent); + struct list_head __user *head_up, + lstcon_rpc_readent_func_t readent); void lstcon_rpc_trans_abort(lstcon_rpc_trans_t *trans, int error); void lstcon_rpc_trans_destroy(lstcon_rpc_trans_t *trans); void lstcon_rpc_trans_addreq(lstcon_rpc_trans_t *trans, lstcon_rpc_t *req); @@ -145,4 +149,4 @@ void lstcon_rpc_module_fini(void); #endif -#endif +#endif