Motr  M0
svc_internal.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2021 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_DTM0_SVC_INTERNAL_H__
26 #define __MOTR_DTM0_SVC_INTERNAL_H__
27 
28 /* import */
29 #include "fop/fom_long_lock.h" /* m0_long_lock */
30 #include "rpc/link.h" /* m0_rpc_link */
31 struct m0_dtm0_service;
32 
33 /* export */
34 struct dtm0_process;
35 
36 
37 /* Settings for RPC connections with DTM0 services. */
38 enum {
41 };
42 
43 
47 struct dtm0_process {
50  uint64_t dop_magic;
51 
66  char *dop_rep;
72 };
73 
74 M0_INTERNAL int dtm0_process_init(struct dtm0_process *proc,
75  struct m0_dtm0_service *dtms,
76  const struct m0_fid *rem_svc_fid);
77 
78 M0_INTERNAL void dtm0_process_fini(struct dtm0_process *proc);
79 
81 M0_INTERNAL void dtm0_service_conns_term(struct m0_dtm0_service *service);
82 M0_INTERNAL struct dtm0_process *
83 dtm0_service_process__lookup(struct m0_reqh_service *reqh_dtm0_svc,
84  const struct m0_fid *remote_dtm0);
85 
86 #endif /* __MOTR_DTM0_SVC_INTERNAL_H__ */
87 
88 /*
89  * Local variables:
90  * c-indentation-style: "K&R"
91  * c-basic-offset: 8
92  * tab-width: 8
93  * fill-column: 80
94  * scroll-step: 1
95  * End:
96  */
97 /*
98  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
99  */
char * dop_rep
Definition: svc_internal.h:66
M0_INTERNAL void dtm0_service_conns_term(struct m0_dtm0_service *service)
Definition: service.c:471
uint64_t dop_magic
Definition: svc_internal.h:50
struct m0_clink dop_ha_link
Definition: svc_internal.h:56
struct m0_fid dop_rserv_fid
Definition: svc_internal.h:64
struct m0_long_lock dop_llock
Definition: svc_internal.h:71
struct m0_tlink dop_link
Definition: svc_internal.h:49
struct m0_fid dop_rproc_fid
Definition: svc_internal.h:62
struct m0_rpc_link dop_rlink
Definition: svc_internal.h:60
M0_INTERNAL void dtm0_process_fini(struct dtm0_process *proc)
Definition: service.c:464
Definition: fid.h:38
M0_INTERNAL struct dtm0_process * dtm0_service_process__lookup(struct m0_reqh_service *reqh_dtm0_svc, const struct m0_fid *remote_dtm0)
Definition: service.c:149
M0_INTERNAL int dtm0_process_init(struct dtm0_process *proc, struct m0_dtm0_service *dtms, const struct m0_fid *rem_svc_fid)
Definition: service.c:421
static struct m0_reqh_service * service[REQH_IN_UT_MAX]
Definition: long_lock_ut.c:46