Motr  M0
note_fops.c
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2013-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 "fop/fom_generic.h"
24 #include "rpc/rpc.h"
25 #include "rpc/rpc_opcodes.h"
26 
27 #include "ha/note_fops.h"
28 #include "ha/note_fops_xc.h"
29 #include "ha/note_xc.h"
30 
32 
36 
37 M0_INTERNAL void m0_ha_state_fop_fini(void)
38 {
42 }
43 
44 M0_INTERNAL int m0_ha_state_fop_init(void)
45 {
47  .name = "HA State Get",
49  .xt = m0_ha_nvec_xc,
51  .sm = &m0_generic_conf,
52  .svc_type = &m0_rpc_service_type,
53  .rpc_flags = M0_RPC_ITEM_TYPE_REQUEST);
55  .name = "HA State Get Reply",
57  .xt = m0_ha_state_fop_xc,
58  .svc_type = &m0_rpc_service_type,
59  .rpc_flags = M0_RPC_ITEM_TYPE_REPLY);
61  .name = "HA State Set",
63  .xt = m0_ha_nvec_xc,
65  .sm = &m0_generic_conf,
66  .svc_type = &m0_rpc_service_type,
67  .rpc_flags = M0_RPC_ITEM_TYPE_REQUEST);
68  return 0;
69 }
70 
71 
72 /*
73  * Local variables:
74  * c-indentation-style: "K&R"
75  * c-basic-offset: 8
76  * tab-width: 8
77  * fill-column: 80
78  * scroll-step: 1
79  * End:
80  */
81 /*
82  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
83  */
M0_INTERNAL void m0_ha_state_fop_fini(void)
Definition: note_fops.c:37
#define M0_FOP_TYPE_INIT(ft,...)
Definition: fop.h:307
M0_INTERNAL int m0_ha_state_fop_init(void)
Definition: note_fops.c:44
void m0_fop_type_fini(struct m0_fop_type *fopt)
Definition: fop.c:232
static struct m0_xcode_type ** xt[]
Definition: protocol.c:64
struct m0_fop_type m0_ha_state_get_fopt
Definition: note_fops.c:33
const struct m0_sm_conf m0_generic_conf
Definition: fom_generic.c:838
int opcode
Definition: crate.c:301
struct m0_fop_type m0_ha_state_set_fopt
Definition: note_fops.c:35
const char * name
Definition: trace.c:110
const struct m0_fom_type_ops * m0_ha_state_set_fom_type_ops
Definition: note_foms.c:192
struct m0_fop_type m0_ha_state_get_rep_fopt
Definition: note_fops.c:34
struct m0_reqh_service_type m0_rpc_service_type
Definition: service.c:120
const struct m0_fom_type_ops * m0_ha_state_get_fom_type_ops
Definition: note_foms.c:191