Motr  M0
trigger_fop.c
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2012-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/fop.h"
24 #include "fop/fop_item_type.h"
25 
26 #include "sns/cm/cm.h"
27 #include "sns/cm/trigger_fop.h"
28 #include "cm/repreb/trigger_fop.h"
29 #include "cm/repreb/trigger_fop_xc.h"
30 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_SNSCM
31 #include "lib/trace.h"
32 
33 /*
34  * Implements a simplistic sns repair trigger FOM for corresponding trigger FOP.
35  * This is solely for testing purpose and a separate trigger FOP/FOM will be
36  * implemented later, which would be similar to this one.
37  */
38 
39 extern struct m0_cm_type sns_rebalance_cmt;
41 
43 {
52 }
53 
55 {
58  "sns rebalance trigger",
59  trigger_fop_xc,
65  "sns rebalance trigger reply",
66  trigger_rep_fop_xc,
70 
73  "sns rebalance quiesce trigger",
74  trigger_fop_xc,
80  "sns rebalance quiesce trigger reply",
81  trigger_rep_fop_xc,
85 
88  "sns rebalance status",
89  trigger_fop_xc,
95  "sns rebalance status reply",
96  m0_status_rep_fop_xc,
102  "sns rebalance abort",
103  m0_status_rep_fop_xc,
109  "sns rebalance abort reply",
110  m0_status_rep_fop_xc,
114 }
115 
116 #undef M0_TRACE_SUBSYSTEM
117 /*
118  * Local variables:
119  * c-indentation-style: "K&R"
120  * c-basic-offset: 8
121  * tab-width: 8
122  * fill-column: 80
123  * scroll-step: 1
124  * End:
125  */
struct m0_fop_type m0_sns_rebalance_status_fopt
M0_INTERNAL void m0_sns_cm_rebalance_trigger_fop_init(void)
Definition: trigger_fop.c:54
struct m0_fop_type m0_sns_rebalance_abort_rep_fopt
struct m0_fop_type m0_sns_rebalance_abort_fopt
struct m0_fop_type m0_sns_rebalance_status_rep_fopt
M0_INTERNAL void m0_cm_trigger_fop_fini(struct m0_fop_type *ft)
Definition: trigger_fom.c:353
struct m0_fop_type m0_sns_rebalance_quiesce_fopt
Definition: cm.h:143
M0_INTERNAL void m0_sns_cm_rebalance_trigger_fop_fini(void)
Definition: trigger_fop.c:42
struct m0_cm_type sns_rebalance_cmt
Definition: cm.c:384
const struct m0_fom_type_ops m0_sns_trigger_fom_type_ops
Definition: trigger_fom.c:60
struct m0_fop_type m0_sns_rebalance_trigger_fopt
M0_INTERNAL void m0_cm_trigger_fop_init(struct m0_fop_type *ft, enum M0_RPC_OPCODES op, const char *name, const struct m0_xcode_type *xt, uint64_t rpc_flags, struct m0_cm_type *cmt, const struct m0_fom_type_ops *ops)
Definition: trigger_fom.c:358
struct m0_fop_type m0_sns_rebalance_quiesce_rep_fopt
struct m0_fop_type m0_sns_rebalance_trigger_rep_fopt