Motr  M0
isc_service.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 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_ISCSERVICE_ISC_SERVICE_H__
26 #define __MOTR_ISCSERVICE_ISC_SERVICE_H__
27 
28 #include "reqh/reqh_service.h" /* m0_reqh_service */
29 #include "lib/hash.h" /* m0_hlink */
30 
31 struct m0_isc_comp_private;
32 
42 };
43 
49 struct m0_isc_comp {
51  struct m0_fid ic_fid;
53  char *ic_name;
57  uint64_t ic_gen;
62  int (*ic_op)(struct m0_buf *args_in,
63  struct m0_buf *result,
64  struct m0_isc_comp_private *comp_data,
65  int *rc);
69  uint32_t ic_ref_count;
70  uint64_t ic_magic;
71 };
72 
79  uint64_t riscs_magic;
80 };
81 
83 M0_INTERNAL int m0_isc_mod_init(void);
84 M0_INTERNAL void m0_isc_mod_fini(void);
85 
87 M0_INTERNAL struct m0_htable *m0_isc_htable_get(void);
88 
89 M0_INTERNAL int m0_iscs_register(void);
90 M0_INTERNAL void m0_iscs_unregister(void);
91 
93 M0_HT_DECLARE(m0_isc, M0_INTERNAL, struct m0_isc_comp, struct m0_fid);
94 
96 
97 #endif /* __MOTR_ISCSERVICE_ISC_SERVICE_H__ */
98 /*
99  * Local variables:
100  * c-indentation-style: "K&R"
101  * c-basic-offset: 8
102  * tab-width: 8
103  * fill-column: 80
104  * scroll-step: 1
105  * End:
106  */
uint64_t riscs_magic
Definition: isc_service.h:79
uint32_t ic_ref_count
Definition: isc_service.h:69
uint64_t ic_gen
Definition: isc_service.h:57
M0_INTERNAL int m0_isc_mod_init(void)
Definition: isc_service.c:88
M0_INTERNAL int m0_iscs_register(void)
Definition: isc_service.c:104
uint64_t ic_magic
Definition: isc_service.h:70
Definition: buf.h:37
struct m0_reqh_service riscs_gen
Definition: isc_service.h:78
int(* ic_op)(struct m0_buf *args_in, struct m0_buf *result, struct m0_isc_comp_private *comp_data, int *rc)
Definition: isc_service.h:62
struct m0_fid ic_fid
Definition: isc_service.h:51
enum m0_isc_comp_state ic_reg_state
Definition: isc_service.h:67
Definition: fid.h:38
struct m0_reqh_service_type m0_iscs_type
Definition: isc_service.c:76
m0_isc_comp_state
Definition: isc_service.h:37
M0_INTERNAL struct m0_htable * m0_isc_htable_get(void)
Definition: isc_service.c:83
char * ic_name
Definition: isc_service.h:53
struct m0_hlink ic_hlink
Definition: isc_service.h:55
M0_INTERNAL void m0_iscs_unregister(void)
Definition: isc_service.c:119
int32_t rc
Definition: trigger_fop.h:47
M0_INTERNAL void m0_isc_mod_fini(void)
Definition: isc_service.c:99
M0_HT_DECLARE(m0_isc, M0_INTERNAL, struct m0_isc_comp, struct m0_fid)