Motr  M0
isc_fops.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * For any questions about this software or licensing,
17  * please email opensource@seagate.com or cortx-questions@seagate.com.
18  *
19  */
20 
21 
22 #include "lib/errno.h"
23 #include "lib/memory.h"
24 #include "fop/fom.h"
25 #include "fop/fop.h"
26 #include "iscservice/isc_fops.h"
27 #include "iscservice/isc_fops_xc.h"
28 #include "lib/errno.h"
29 #include "rpc/rpc.h"
30 #include "fop/fop_item_type.h"
31 #include "fop/fom_generic.h"
32 
35 
37 extern const struct m0_fom_type_ops m0_fom_isc_type_ops;
38 extern struct m0_sm_state_descr isc_fom_phases[];
39 extern struct m0_sm_conf isc_sm_conf;
40 
41 M0_INTERNAL int m0_iscservice_fop_init(void)
42 {
46  .name = "isc-exec-fop",
48  .xt = m0_fop_isc_xc,
49  .rpc_flags = M0_RPC_ITEM_TYPE_REQUEST,
50  .fom_ops = &m0_fom_isc_type_ops,
51  .svc_type = &m0_iscs_type,
52  .sm = &isc_sm_conf);
53 
55  .name = "isc-fop-reply",
57  .xt = m0_fop_isc_rep_xc,
58  .rpc_flags = M0_RPC_ITEM_TYPE_REPLY,
59  .svc_type = &m0_iscs_type
60  );
63 }
64 
65 M0_INTERNAL void m0_iscservice_fop_fini(void)
66 {
69 
72 }
73 
74 /*
75  * Local variables:
76  * c-indentation-style: "K&R"
77  * c-basic-offset: 8
78  * tab-width: 8
79  * fill-column: 80
80  * scroll-step: 1
81  * End:
82  */
#define M0_FOP_TYPE_INIT(ft,...)
Definition: fop.h:307
Definition: sm.h:350
void m0_fop_type_addb2_deinstrument(struct m0_fop_type *type)
Definition: fop.c:493
void m0_fop_type_fini(struct m0_fop_type *fopt)
Definition: fop.c:232
M0_INTERNAL void m0_sm_conf_extend(const struct m0_sm_state_descr *base, struct m0_sm_state_descr *sub, uint32_t nr)
Definition: sm.c:763
static struct m0_xcode_type ** xt[]
Definition: protocol.c:64
const struct m0_sm_conf m0_generic_conf
Definition: fom_generic.c:838
int opcode
Definition: crate.c:301
struct m0_reqh_service_type m0_iscs_type
Definition: isc_service.c:76
struct m0_fop_type m0_fop_isc_rep_fopt
Definition: isc_fops.c:34
const char * name
Definition: trace.c:110
const struct m0_fom_type_ops m0_fom_isc_type_ops
Definition: isc.c:382
M0_INTERNAL int m0_iscservice_fop_init(void)
Definition: isc_fops.c:41
struct m0_fop_type m0_fop_isc_fopt
Definition: isc_fops.c:33
uint32_t scf_nr_states
Definition: sm.h:354
struct m0_sm_state_descr isc_fom_phases[]
Definition: isc.c:73
M0_INTERNAL void m0_iscservice_fop_fini(void)
Definition: isc_fops.c:65
struct m0_sm_state_descr * scf_state
Definition: sm.h:356
int m0_fop_type_addb2_instrument(struct m0_fop_type *type)
Definition: fop.c:461
struct m0_sm_conf isc_sm_conf
Definition: isc.c:386