Motr  M0
fi_command_fops.c
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2017-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 #include "fis/fi_command_fom.h" /* m0_fi_command_fom_type_ops */
24 #include "fis/fi_command_fops.h"
25 #include "fis/fi_command_xc.h" /* m0_fi_command_req_xc, m0_fi_command_rep_xc */
26 #include "fop/fom_generic.h" /* m0_generic_conf */
27 #include "fop/fop.h" /* M0_FOP_TYPE_INIT */
28 #include "rpc/rpc.h" /* m0_rpc_service_type */
29 #include "rpc/rpc_opcodes.h"
30 
37 
45 
46 M0_INTERNAL void m0_fi_command_fop_init(void)
47 {
49 
51  .name = "Fault Injection Command",
53  .xt = m0_fi_command_req_xc,
54  .sm = &m0_generic_conf,
55  .fom_ops = &m0_fi_command_fom_type_ops,
56  .svc_type = &m0_rpc_service_type,
57  .rpc_flags = M0_RPC_ITEM_TYPE_REQUEST);
59  .name = "Fault Injection Command reply",
61  .xt = m0_fi_command_rep_xc,
62  .rpc_flags = M0_RPC_ITEM_TYPE_REPLY,
63  .svc_type = &m0_rpc_service_type);
64 }
65 
66 M0_INTERNAL void m0_fi_command_fop_fini(void)
67 {
70 }
71 
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
struct m0_fop_type m0_fi_command_req_fopt
void m0_fop_type_fini(struct m0_fop_type *fopt)
Definition: fop.c:232
static struct m0_xcode_type ** xt[]
Definition: protocol.c:64
const struct m0_fom_type_ops m0_fi_command_fom_type_ops
const struct m0_sm_conf m0_generic_conf
Definition: fom_generic.c:838
struct m0_fop_type m0_fi_command_rep_fopt
int opcode
Definition: crate.c:301
const char * name
Definition: trace.c:110
M0_INTERNAL void m0_fi_command_fop_init(void)
struct m0_reqh_service_type m0_rpc_service_type
Definition: service.c:120
M0_INTERNAL void m0_fi_command_fop_fini(void)