Motr  M0
link_service.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2016-2020 Seagate Technology LLC and/or its Affiliates
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 
23 #pragma once
24 
25 #ifndef __MOTR_HA_LINK_SERVICE_H__
26 #define __MOTR_HA_LINK_SERVICE_H__
27 
34 struct m0_chan;
35 struct m0_reqh;
36 struct m0_reqh_service;
38 struct m0_ha_link;
39 
41 
42 M0_INTERNAL int m0_ha_link_service_init(struct m0_reqh_service **hl_service,
43  struct m0_reqh *reqh);
44 M0_INTERNAL void m0_ha_link_service_fini(struct m0_reqh_service *hl_service);
45 
47 M0_INTERNAL struct m0_ha_link *
49  const struct m0_uint128 *link_id,
50  struct m0_uint128 *connection_id);
51 M0_INTERNAL void m0_ha_link_service_put(struct m0_reqh_service *service,
52  struct m0_ha_link *hl);
53 
54 M0_INTERNAL void
56  struct m0_ha_link *hl,
57  const struct m0_uint128 *link_id,
58  const struct m0_uint128 *connection_id);
60  struct m0_ha_link *hl);
61 M0_INTERNAL void m0_ha_link_service_quiesce(struct m0_reqh_service *service,
62  struct m0_ha_link *hl,
63  struct m0_chan *chan);
64 
65 M0_INTERNAL int m0_ha_link_service_mod_init(void);
66 M0_INTERNAL void m0_ha_link_service_mod_fini(void);
67 
69 #endif /* __MOTR_HA_LINK_SERVICE_H__ */
70 
71 /*
72  * Local variables:
73  * c-indentation-style: "K&R"
74  * c-basic-offset: 8
75  * tab-width: 8
76  * fill-column: 80
77  * scroll-step: 1
78  * End:
79  */
80 /*
81  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
82  */
M0_INTERNAL void m0_ha_link_service_put(struct m0_reqh_service *service, struct m0_ha_link *hl)
Definition: link_service.c:176
M0_INTERNAL struct m0_ha_link * m0_ha_link_service_find_get(struct m0_reqh_service *service, const struct m0_uint128 *link_id, struct m0_uint128 *connection_id)
Definition: link_service.c:157
Definition: reqh.h:94
Definition: chan.h:229
M0_INTERNAL int m0_ha_link_service_init(struct m0_reqh_service **hl_service, struct m0_reqh *reqh)
Definition: link_service.c:290
M0_INTERNAL int m0_ha_link_service_mod_init(void)
Definition: link_service.c:305
M0_INTERNAL void m0_ha_link_service_register(struct m0_reqh_service *service, struct m0_ha_link *hl, const struct m0_uint128 *link_id, const struct m0_uint128 *connection_id)
Definition: link_service.c:215
struct m0_reqh reqh
Definition: rm_foms.c:48
struct m0_reqh_service_type m0_ha_link_service_type
Definition: link_service.c:263
static struct m0_chan chan[RDWR_REQUEST_MAX]
M0_INTERNAL void m0_ha_link_service_fini(struct m0_reqh_service *hl_service)
Definition: link_service.c:298
M0_INTERNAL void m0_ha_link_service_quiesce(struct m0_reqh_service *service, struct m0_ha_link *hl, struct m0_chan *chan)
Definition: link_service.c:197
M0_INTERNAL void m0_ha_link_service_deregister(struct m0_reqh_service *service, struct m0_ha_link *hl)
Definition: link_service.c:235
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
Definition: long_lock_ut.c:46
M0_INTERNAL void m0_ha_link_service_mod_fini(void)
Definition: link_service.c:310