@@ -108,7 +108,7 @@ static void free_id(struct rtrs_srv_op *id)
108108
109109static void rtrs_srv_free_ops_ids (struct rtrs_srv_path * srv_path )
110110{
111- struct rtrs_srv * srv = srv_path -> srv ;
111+ struct rtrs_srv_sess * srv = srv_path -> srv ;
112112 int i ;
113113
114114 if (srv_path -> ops_ids ) {
@@ -137,7 +137,7 @@ static inline void rtrs_srv_inflight_ref_release(struct percpu_ref *ref)
137137
138138static int rtrs_srv_alloc_ops_ids (struct rtrs_srv_path * srv_path )
139139{
140- struct rtrs_srv * srv = srv_path -> srv ;
140+ struct rtrs_srv_sess * srv = srv_path -> srv ;
141141 struct rtrs_srv_op * id ;
142142 int i , ret ;
143143
@@ -541,7 +541,7 @@ EXPORT_SYMBOL(rtrs_srv_resp_rdma);
541541 * @srv: Session pointer
542542 * @priv: The private pointer that is associated with the session.
543543 */
544- void rtrs_srv_set_sess_priv (struct rtrs_srv * srv , void * priv )
544+ void rtrs_srv_set_sess_priv (struct rtrs_srv_sess * srv , void * priv )
545545{
546546 srv -> priv = priv ;
547547}
@@ -566,7 +566,7 @@ static void unmap_cont_bufs(struct rtrs_srv_path *srv_path)
566566
567567static int map_cont_bufs (struct rtrs_srv_path * srv_path )
568568{
569- struct rtrs_srv * srv = srv_path -> srv ;
569+ struct rtrs_srv_sess * srv = srv_path -> srv ;
570570 struct rtrs_path * ss = & srv_path -> s ;
571571 int i , mri , err , mrs_num ;
572572 unsigned int chunk_bits ;
@@ -723,7 +723,7 @@ static void rtrs_srv_info_rsp_done(struct ib_cq *cq, struct ib_wc *wc)
723723
724724static void rtrs_srv_path_up (struct rtrs_srv_path * srv_path )
725725{
726- struct rtrs_srv * srv = srv_path -> srv ;
726+ struct rtrs_srv_sess * srv = srv_path -> srv ;
727727 struct rtrs_srv_ctx * ctx = srv -> ctx ;
728728 int up ;
729729
@@ -739,7 +739,7 @@ static void rtrs_srv_path_up(struct rtrs_srv_path *srv_path)
739739
740740static void rtrs_srv_path_down (struct rtrs_srv_path * srv_path )
741741{
742- struct rtrs_srv * srv = srv_path -> srv ;
742+ struct rtrs_srv_sess * srv = srv_path -> srv ;
743743 struct rtrs_srv_ctx * ctx = srv -> ctx ;
744744
745745 if (!srv_path -> established )
@@ -756,7 +756,7 @@ static void rtrs_srv_path_down(struct rtrs_srv_path *srv_path)
756756static bool exist_pathname (struct rtrs_srv_ctx * ctx ,
757757 const char * pathname , const uuid_t * path_uuid )
758758{
759- struct rtrs_srv * srv ;
759+ struct rtrs_srv_sess * srv ;
760760 struct rtrs_srv_path * srv_path ;
761761 bool found = false;
762762
@@ -973,7 +973,7 @@ static int post_recv_io(struct rtrs_srv_con *con, size_t q_size)
973973
974974static int post_recv_path (struct rtrs_srv_path * srv_path )
975975{
976- struct rtrs_srv * srv = srv_path -> srv ;
976+ struct rtrs_srv_sess * srv = srv_path -> srv ;
977977 struct rtrs_path * s = & srv_path -> s ;
978978 size_t q_size ;
979979 int err , cid ;
@@ -1000,7 +1000,7 @@ static void process_read(struct rtrs_srv_con *con,
10001000{
10011001 struct rtrs_path * s = con -> c .path ;
10021002 struct rtrs_srv_path * srv_path = to_srv_path (s );
1003- struct rtrs_srv * srv = srv_path -> srv ;
1003+ struct rtrs_srv_sess * srv = srv_path -> srv ;
10041004 struct rtrs_srv_ctx * ctx = srv -> ctx ;
10051005 struct rtrs_srv_op * id ;
10061006
@@ -1058,7 +1058,7 @@ static void process_write(struct rtrs_srv_con *con,
10581058{
10591059 struct rtrs_path * s = con -> c .path ;
10601060 struct rtrs_srv_path * srv_path = to_srv_path (s );
1061- struct rtrs_srv * srv = srv_path -> srv ;
1061+ struct rtrs_srv_sess * srv = srv_path -> srv ;
10621062 struct rtrs_srv_ctx * ctx = srv -> ctx ;
10631063 struct rtrs_srv_op * id ;
10641064
@@ -1145,7 +1145,7 @@ static void rtrs_srv_inv_rkey_done(struct ib_cq *cq, struct ib_wc *wc)
11451145 struct rtrs_srv_con * con = to_srv_con (wc -> qp -> qp_context );
11461146 struct rtrs_path * s = con -> c .path ;
11471147 struct rtrs_srv_path * srv_path = to_srv_path (s );
1148- struct rtrs_srv * srv = srv_path -> srv ;
1148+ struct rtrs_srv_sess * srv = srv_path -> srv ;
11491149 u32 msg_id , off ;
11501150 void * data ;
11511151
@@ -1202,7 +1202,7 @@ static void rtrs_srv_rdma_done(struct ib_cq *cq, struct ib_wc *wc)
12021202 struct rtrs_srv_con * con = to_srv_con (wc -> qp -> qp_context );
12031203 struct rtrs_path * s = con -> c .path ;
12041204 struct rtrs_srv_path * srv_path = to_srv_path (s );
1205- struct rtrs_srv * srv = srv_path -> srv ;
1205+ struct rtrs_srv_sess * srv = srv_path -> srv ;
12061206 u32 imm_type , imm_payload ;
12071207 int err ;
12081208
@@ -1295,7 +1295,7 @@ static void rtrs_srv_rdma_done(struct ib_cq *cq, struct ib_wc *wc)
12951295 * @pathname: Pathname buffer
12961296 * @len: Length of sessname buffer
12971297 */
1298- int rtrs_srv_get_path_name (struct rtrs_srv * srv , char * pathname ,
1298+ int rtrs_srv_get_path_name (struct rtrs_srv_sess * srv , char * pathname ,
12991299 size_t len )
13001300{
13011301 struct rtrs_srv_path * srv_path ;
@@ -1320,7 +1320,7 @@ EXPORT_SYMBOL(rtrs_srv_get_path_name);
13201320 * rtrs_srv_get_queue_depth() - Get rtrs_srv qdepth.
13211321 * @srv: Session
13221322 */
1323- int rtrs_srv_get_queue_depth (struct rtrs_srv * srv )
1323+ int rtrs_srv_get_queue_depth (struct rtrs_srv_sess * srv )
13241324{
13251325 return srv -> queue_depth ;
13261326}
@@ -1346,12 +1346,13 @@ static int rtrs_srv_get_next_cq_vector(struct rtrs_srv_path *srv_path)
13461346
13471347static void rtrs_srv_dev_release (struct device * dev )
13481348{
1349- struct rtrs_srv * srv = container_of (dev , struct rtrs_srv , dev );
1349+ struct rtrs_srv_sess * srv = container_of (dev , struct rtrs_srv_sess ,
1350+ dev );
13501351
13511352 kfree (srv );
13521353}
13531354
1354- static void free_srv (struct rtrs_srv * srv )
1355+ static void free_srv (struct rtrs_srv_sess * srv )
13551356{
13561357 int i ;
13571358
@@ -1365,11 +1366,11 @@ static void free_srv(struct rtrs_srv *srv)
13651366 put_device (& srv -> dev );
13661367}
13671368
1368- static struct rtrs_srv * get_or_create_srv (struct rtrs_srv_ctx * ctx ,
1369+ static struct rtrs_srv_sess * get_or_create_srv (struct rtrs_srv_ctx * ctx ,
13691370 const uuid_t * paths_uuid ,
13701371 bool first_conn )
13711372{
1372- struct rtrs_srv * srv ;
1373+ struct rtrs_srv_sess * srv ;
13731374 int i ;
13741375
13751376 mutex_lock (& ctx -> srv_mutex );
@@ -1431,7 +1432,7 @@ static struct rtrs_srv *get_or_create_srv(struct rtrs_srv_ctx *ctx,
14311432 return ERR_PTR (- ENOMEM );
14321433}
14331434
1434- static void put_srv (struct rtrs_srv * srv )
1435+ static void put_srv (struct rtrs_srv_sess * srv )
14351436{
14361437 if (refcount_dec_and_test (& srv -> refcount )) {
14371438 struct rtrs_srv_ctx * ctx = srv -> ctx ;
@@ -1445,7 +1446,7 @@ static void put_srv(struct rtrs_srv *srv)
14451446 }
14461447}
14471448
1448- static void __add_path_to_srv (struct rtrs_srv * srv ,
1449+ static void __add_path_to_srv (struct rtrs_srv_sess * srv ,
14491450 struct rtrs_srv_path * srv_path )
14501451{
14511452 list_add_tail (& srv_path -> s .entry , & srv -> paths_list );
@@ -1455,7 +1456,7 @@ static void __add_path_to_srv(struct rtrs_srv *srv,
14551456
14561457static void del_path_from_srv (struct rtrs_srv_path * srv_path )
14571458{
1458- struct rtrs_srv * srv = srv_path -> srv ;
1459+ struct rtrs_srv_sess * srv = srv_path -> srv ;
14591460
14601461 if (WARN_ON (!srv ))
14611462 return ;
@@ -1491,7 +1492,7 @@ static int sockaddr_cmp(const struct sockaddr *a, const struct sockaddr *b)
14911492 }
14921493}
14931494
1494- static bool __is_path_w_addr_exists (struct rtrs_srv * srv ,
1495+ static bool __is_path_w_addr_exists (struct rtrs_srv_sess * srv ,
14951496 struct rdma_addr * addr )
14961497{
14971498 struct rtrs_srv_path * srv_path ;
@@ -1574,7 +1575,7 @@ static void rtrs_srv_close_work(struct work_struct *work)
15741575static int rtrs_rdma_do_accept (struct rtrs_srv_path * srv_path ,
15751576 struct rdma_cm_id * cm_id )
15761577{
1577- struct rtrs_srv * srv = srv_path -> srv ;
1578+ struct rtrs_srv_sess * srv = srv_path -> srv ;
15781579 struct rtrs_msg_conn_rsp msg ;
15791580 struct rdma_conn_param param ;
15801581 int err ;
@@ -1623,7 +1624,7 @@ static int rtrs_rdma_do_reject(struct rdma_cm_id *cm_id, int errno)
16231624}
16241625
16251626static struct rtrs_srv_path *
1626- __find_path (struct rtrs_srv * srv , const uuid_t * sess_uuid )
1627+ __find_path (struct rtrs_srv_sess * srv , const uuid_t * sess_uuid )
16271628{
16281629 struct rtrs_srv_path * srv_path ;
16291630
@@ -1639,7 +1640,7 @@ static int create_con(struct rtrs_srv_path *srv_path,
16391640 struct rdma_cm_id * cm_id ,
16401641 unsigned int cid )
16411642{
1642- struct rtrs_srv * srv = srv_path -> srv ;
1643+ struct rtrs_srv_sess * srv = srv_path -> srv ;
16431644 struct rtrs_path * s = & srv_path -> s ;
16441645 struct rtrs_srv_con * con ;
16451646
@@ -1726,7 +1727,7 @@ static int create_con(struct rtrs_srv_path *srv_path,
17261727 return err ;
17271728}
17281729
1729- static struct rtrs_srv_path * __alloc_path (struct rtrs_srv * srv ,
1730+ static struct rtrs_srv_path * __alloc_path (struct rtrs_srv_sess * srv ,
17301731 struct rdma_cm_id * cm_id ,
17311732 unsigned int con_num ,
17321733 unsigned int recon_cnt ,
@@ -1826,7 +1827,7 @@ static int rtrs_rdma_connect(struct rdma_cm_id *cm_id,
18261827{
18271828 struct rtrs_srv_ctx * ctx = cm_id -> context ;
18281829 struct rtrs_srv_path * srv_path ;
1829- struct rtrs_srv * srv ;
1830+ struct rtrs_srv_sess * srv ;
18301831
18311832 u16 version , con_num , cid ;
18321833 u16 recon_cnt ;
@@ -2185,7 +2186,7 @@ struct rtrs_srv_ctx *rtrs_srv_open(struct rtrs_srv_ops *ops, u16 port)
21852186}
21862187EXPORT_SYMBOL (rtrs_srv_open );
21872188
2188- static void close_paths (struct rtrs_srv * srv )
2189+ static void close_paths (struct rtrs_srv_sess * srv )
21892190{
21902191 struct rtrs_srv_path * srv_path ;
21912192
@@ -2197,7 +2198,7 @@ static void close_paths(struct rtrs_srv *srv)
21972198
21982199static void close_ctx (struct rtrs_srv_ctx * ctx )
21992200{
2200- struct rtrs_srv * srv ;
2201+ struct rtrs_srv_sess * srv ;
22012202
22022203 mutex_lock (& ctx -> srv_mutex );
22032204 list_for_each_entry (srv , & ctx -> srv_list , ctx_list )
0 commit comments