@@ -108,7 +108,7 @@ static void free_id(struct rtrs_srv_op *id)
108
108
109
109
static void rtrs_srv_free_ops_ids (struct rtrs_srv_path * srv_path )
110
110
{
111
- struct rtrs_srv * srv = srv_path -> srv ;
111
+ struct rtrs_srv_sess * srv = srv_path -> srv ;
112
112
int i ;
113
113
114
114
if (srv_path -> ops_ids ) {
@@ -137,7 +137,7 @@ static inline void rtrs_srv_inflight_ref_release(struct percpu_ref *ref)
137
137
138
138
static int rtrs_srv_alloc_ops_ids (struct rtrs_srv_path * srv_path )
139
139
{
140
- struct rtrs_srv * srv = srv_path -> srv ;
140
+ struct rtrs_srv_sess * srv = srv_path -> srv ;
141
141
struct rtrs_srv_op * id ;
142
142
int i , ret ;
143
143
@@ -541,7 +541,7 @@ EXPORT_SYMBOL(rtrs_srv_resp_rdma);
541
541
* @srv: Session pointer
542
542
* @priv: The private pointer that is associated with the session.
543
543
*/
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 )
545
545
{
546
546
srv -> priv = priv ;
547
547
}
@@ -566,7 +566,7 @@ static void unmap_cont_bufs(struct rtrs_srv_path *srv_path)
566
566
567
567
static int map_cont_bufs (struct rtrs_srv_path * srv_path )
568
568
{
569
- struct rtrs_srv * srv = srv_path -> srv ;
569
+ struct rtrs_srv_sess * srv = srv_path -> srv ;
570
570
struct rtrs_path * ss = & srv_path -> s ;
571
571
int i , mri , err , mrs_num ;
572
572
unsigned int chunk_bits ;
@@ -723,7 +723,7 @@ static void rtrs_srv_info_rsp_done(struct ib_cq *cq, struct ib_wc *wc)
723
723
724
724
static void rtrs_srv_path_up (struct rtrs_srv_path * srv_path )
725
725
{
726
- struct rtrs_srv * srv = srv_path -> srv ;
726
+ struct rtrs_srv_sess * srv = srv_path -> srv ;
727
727
struct rtrs_srv_ctx * ctx = srv -> ctx ;
728
728
int up ;
729
729
@@ -739,7 +739,7 @@ static void rtrs_srv_path_up(struct rtrs_srv_path *srv_path)
739
739
740
740
static void rtrs_srv_path_down (struct rtrs_srv_path * srv_path )
741
741
{
742
- struct rtrs_srv * srv = srv_path -> srv ;
742
+ struct rtrs_srv_sess * srv = srv_path -> srv ;
743
743
struct rtrs_srv_ctx * ctx = srv -> ctx ;
744
744
745
745
if (!srv_path -> established )
@@ -756,7 +756,7 @@ static void rtrs_srv_path_down(struct rtrs_srv_path *srv_path)
756
756
static bool exist_pathname (struct rtrs_srv_ctx * ctx ,
757
757
const char * pathname , const uuid_t * path_uuid )
758
758
{
759
- struct rtrs_srv * srv ;
759
+ struct rtrs_srv_sess * srv ;
760
760
struct rtrs_srv_path * srv_path ;
761
761
bool found = false;
762
762
@@ -973,7 +973,7 @@ static int post_recv_io(struct rtrs_srv_con *con, size_t q_size)
973
973
974
974
static int post_recv_path (struct rtrs_srv_path * srv_path )
975
975
{
976
- struct rtrs_srv * srv = srv_path -> srv ;
976
+ struct rtrs_srv_sess * srv = srv_path -> srv ;
977
977
struct rtrs_path * s = & srv_path -> s ;
978
978
size_t q_size ;
979
979
int err , cid ;
@@ -1000,7 +1000,7 @@ static void process_read(struct rtrs_srv_con *con,
1000
1000
{
1001
1001
struct rtrs_path * s = con -> c .path ;
1002
1002
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 ;
1004
1004
struct rtrs_srv_ctx * ctx = srv -> ctx ;
1005
1005
struct rtrs_srv_op * id ;
1006
1006
@@ -1058,7 +1058,7 @@ static void process_write(struct rtrs_srv_con *con,
1058
1058
{
1059
1059
struct rtrs_path * s = con -> c .path ;
1060
1060
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 ;
1062
1062
struct rtrs_srv_ctx * ctx = srv -> ctx ;
1063
1063
struct rtrs_srv_op * id ;
1064
1064
@@ -1145,7 +1145,7 @@ static void rtrs_srv_inv_rkey_done(struct ib_cq *cq, struct ib_wc *wc)
1145
1145
struct rtrs_srv_con * con = to_srv_con (wc -> qp -> qp_context );
1146
1146
struct rtrs_path * s = con -> c .path ;
1147
1147
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 ;
1149
1149
u32 msg_id , off ;
1150
1150
void * data ;
1151
1151
@@ -1202,7 +1202,7 @@ static void rtrs_srv_rdma_done(struct ib_cq *cq, struct ib_wc *wc)
1202
1202
struct rtrs_srv_con * con = to_srv_con (wc -> qp -> qp_context );
1203
1203
struct rtrs_path * s = con -> c .path ;
1204
1204
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 ;
1206
1206
u32 imm_type , imm_payload ;
1207
1207
int err ;
1208
1208
@@ -1295,7 +1295,7 @@ static void rtrs_srv_rdma_done(struct ib_cq *cq, struct ib_wc *wc)
1295
1295
* @pathname: Pathname buffer
1296
1296
* @len: Length of sessname buffer
1297
1297
*/
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 ,
1299
1299
size_t len )
1300
1300
{
1301
1301
struct rtrs_srv_path * srv_path ;
@@ -1320,7 +1320,7 @@ EXPORT_SYMBOL(rtrs_srv_get_path_name);
1320
1320
* rtrs_srv_get_queue_depth() - Get rtrs_srv qdepth.
1321
1321
* @srv: Session
1322
1322
*/
1323
- int rtrs_srv_get_queue_depth (struct rtrs_srv * srv )
1323
+ int rtrs_srv_get_queue_depth (struct rtrs_srv_sess * srv )
1324
1324
{
1325
1325
return srv -> queue_depth ;
1326
1326
}
@@ -1346,12 +1346,13 @@ static int rtrs_srv_get_next_cq_vector(struct rtrs_srv_path *srv_path)
1346
1346
1347
1347
static void rtrs_srv_dev_release (struct device * dev )
1348
1348
{
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 );
1350
1351
1351
1352
kfree (srv );
1352
1353
}
1353
1354
1354
- static void free_srv (struct rtrs_srv * srv )
1355
+ static void free_srv (struct rtrs_srv_sess * srv )
1355
1356
{
1356
1357
int i ;
1357
1358
@@ -1365,11 +1366,11 @@ static void free_srv(struct rtrs_srv *srv)
1365
1366
put_device (& srv -> dev );
1366
1367
}
1367
1368
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 ,
1369
1370
const uuid_t * paths_uuid ,
1370
1371
bool first_conn )
1371
1372
{
1372
- struct rtrs_srv * srv ;
1373
+ struct rtrs_srv_sess * srv ;
1373
1374
int i ;
1374
1375
1375
1376
mutex_lock (& ctx -> srv_mutex );
@@ -1431,7 +1432,7 @@ static struct rtrs_srv *get_or_create_srv(struct rtrs_srv_ctx *ctx,
1431
1432
return ERR_PTR (- ENOMEM );
1432
1433
}
1433
1434
1434
- static void put_srv (struct rtrs_srv * srv )
1435
+ static void put_srv (struct rtrs_srv_sess * srv )
1435
1436
{
1436
1437
if (refcount_dec_and_test (& srv -> refcount )) {
1437
1438
struct rtrs_srv_ctx * ctx = srv -> ctx ;
@@ -1445,7 +1446,7 @@ static void put_srv(struct rtrs_srv *srv)
1445
1446
}
1446
1447
}
1447
1448
1448
- static void __add_path_to_srv (struct rtrs_srv * srv ,
1449
+ static void __add_path_to_srv (struct rtrs_srv_sess * srv ,
1449
1450
struct rtrs_srv_path * srv_path )
1450
1451
{
1451
1452
list_add_tail (& srv_path -> s .entry , & srv -> paths_list );
@@ -1455,7 +1456,7 @@ static void __add_path_to_srv(struct rtrs_srv *srv,
1455
1456
1456
1457
static void del_path_from_srv (struct rtrs_srv_path * srv_path )
1457
1458
{
1458
- struct rtrs_srv * srv = srv_path -> srv ;
1459
+ struct rtrs_srv_sess * srv = srv_path -> srv ;
1459
1460
1460
1461
if (WARN_ON (!srv ))
1461
1462
return ;
@@ -1491,7 +1492,7 @@ static int sockaddr_cmp(const struct sockaddr *a, const struct sockaddr *b)
1491
1492
}
1492
1493
}
1493
1494
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 ,
1495
1496
struct rdma_addr * addr )
1496
1497
{
1497
1498
struct rtrs_srv_path * srv_path ;
@@ -1574,7 +1575,7 @@ static void rtrs_srv_close_work(struct work_struct *work)
1574
1575
static int rtrs_rdma_do_accept (struct rtrs_srv_path * srv_path ,
1575
1576
struct rdma_cm_id * cm_id )
1576
1577
{
1577
- struct rtrs_srv * srv = srv_path -> srv ;
1578
+ struct rtrs_srv_sess * srv = srv_path -> srv ;
1578
1579
struct rtrs_msg_conn_rsp msg ;
1579
1580
struct rdma_conn_param param ;
1580
1581
int err ;
@@ -1623,7 +1624,7 @@ static int rtrs_rdma_do_reject(struct rdma_cm_id *cm_id, int errno)
1623
1624
}
1624
1625
1625
1626
static 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 )
1627
1628
{
1628
1629
struct rtrs_srv_path * srv_path ;
1629
1630
@@ -1639,7 +1640,7 @@ static int create_con(struct rtrs_srv_path *srv_path,
1639
1640
struct rdma_cm_id * cm_id ,
1640
1641
unsigned int cid )
1641
1642
{
1642
- struct rtrs_srv * srv = srv_path -> srv ;
1643
+ struct rtrs_srv_sess * srv = srv_path -> srv ;
1643
1644
struct rtrs_path * s = & srv_path -> s ;
1644
1645
struct rtrs_srv_con * con ;
1645
1646
@@ -1726,7 +1727,7 @@ static int create_con(struct rtrs_srv_path *srv_path,
1726
1727
return err ;
1727
1728
}
1728
1729
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 ,
1730
1731
struct rdma_cm_id * cm_id ,
1731
1732
unsigned int con_num ,
1732
1733
unsigned int recon_cnt ,
@@ -1826,7 +1827,7 @@ static int rtrs_rdma_connect(struct rdma_cm_id *cm_id,
1826
1827
{
1827
1828
struct rtrs_srv_ctx * ctx = cm_id -> context ;
1828
1829
struct rtrs_srv_path * srv_path ;
1829
- struct rtrs_srv * srv ;
1830
+ struct rtrs_srv_sess * srv ;
1830
1831
1831
1832
u16 version , con_num , cid ;
1832
1833
u16 recon_cnt ;
@@ -2185,7 +2186,7 @@ struct rtrs_srv_ctx *rtrs_srv_open(struct rtrs_srv_ops *ops, u16 port)
2185
2186
}
2186
2187
EXPORT_SYMBOL (rtrs_srv_open );
2187
2188
2188
- static void close_paths (struct rtrs_srv * srv )
2189
+ static void close_paths (struct rtrs_srv_sess * srv )
2189
2190
{
2190
2191
struct rtrs_srv_path * srv_path ;
2191
2192
@@ -2197,7 +2198,7 @@ static void close_paths(struct rtrs_srv *srv)
2197
2198
2198
2199
static void close_ctx (struct rtrs_srv_ctx * ctx )
2199
2200
{
2200
- struct rtrs_srv * srv ;
2201
+ struct rtrs_srv_sess * srv ;
2201
2202
2202
2203
mutex_lock (& ctx -> srv_mutex );
2203
2204
list_for_each_entry (srv , & ctx -> srv_list , ctx_list )
0 commit comments