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"
30 
31 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_SNSCM
32 #include "lib/trace.h"
33 
34 /*
35  * Implements a simplistic sns repair trigger FOM for corresponding trigger FOP.
36  * This is solely for testing purpose and a separate trigger FOP/FOM will be
37  * implemented later, which would be similar to this one.
38  */
39 
40 extern struct m0_cm_type sns_repair_cmt;
42 
43 M0_INTERNAL void m0_sns_cm_repair_trigger_fop_fini(void)
44 {
53 }
54 
55 M0_INTERNAL void m0_sns_cm_repair_trigger_fop_init(void)
56 {
59  "sns repair trigger",
66  "sns repair trigger reply",
71 
74  "sns repair quiesce trigger",
81  "sns repair quiesce trigger reply",
86 
89  "sns repair status",
96  "sns repair status reply",
103  "sns repair abort",
110  "sns repair abort reply",
115 }
116 
117 
118 
119 #undef M0_TRACE_SUBSYSTEM
120 /*
121  * Local variables:
122  * c-indentation-style: "K&R"
123  * c-basic-offset: 8
124  * tab-width: 8
125  * fill-column: 80
126  * scroll-step: 1
127  * End:
128  */
struct m0_xcode_type * m0_status_rep_fop_xc
struct m0_xcode_type * trigger_fop_xc
struct m0_fop_type m0_sns_repair_status_rep_fopt
struct m0_fop_type m0_sns_repair_trigger_rep_fopt
struct m0_fop_type m0_sns_repair_quiesce_rep_fopt
M0_INTERNAL void m0_sns_cm_repair_trigger_fop_init(void)
Definition: trigger_fop.c:55
struct m0_fop_type m0_sns_repair_status_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_repair_quiesce_fopt
struct m0_cm_type sns_repair_cmt
Definition: cm.c:383
Definition: cm.h:143
struct m0_fop_type m0_sns_repair_abort_rep_fopt
const struct m0_fom_type_ops m0_sns_trigger_fom_type_ops
Definition: trigger_fom.c:60
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_repair_trigger_fopt
struct m0_fop_type m0_sns_repair_abort_fopt
M0_INTERNAL void m0_sns_cm_repair_trigger_fop_fini(void)
Definition: trigger_fop.c:43
struct m0_xcode_type * trigger_rep_fop_xc