Motr  M0
trigger_fom.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2016-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 #pragma once
24 
25 #ifndef __MOTR_CM_REPREB_TRIGGER_FOM_H__
26 #define __MOTR_CM_REPREB_TRIGGER_FOM_H__
27 
33 #include "cm/repreb/cm.h"
34 #include "lib/types.h"
35 #include "fop/fom_generic.h" /* M0_FOPH_NR */
36 
37 struct m0_fom;
38 
40  struct m0_fop_type* (*fto_type)(uint32_t op);
41  uint64_t (*fto_progress)(struct m0_fom *fom, bool reinit_counter);
42  void (*fto_prepare)(struct m0_fom *fom);
43 };
44 
46  const struct m0_fom_trigger_ops *tf_ops;
47  struct m0_fom tf_fom;
48 };
49 
50 #ifndef __KERNEL__
51 
57 };
58 
59 #endif
60 
61 M0_INTERNAL int m0_trigger_fom_create(struct m0_trigger_fom *tfom,
62  struct m0_fop *fop,
63  struct m0_reqh *reqh);
65 #endif /* __MOTR_CM_REPREB_TRIGGER_FOM_H__ */
66 
67 /*
68  * Local variables:
69  * c-indentation-style: "K&R"
70  * c-basic-offset: 8
71  * tab-width: 8
72  * fill-column: 80
73  * scroll-step: 1
74  * End:
75  */
76 /*
77  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
78  */
M0_INTERNAL int m0_trigger_fom_create(struct m0_trigger_fom *tfom, struct m0_fop *fop, struct m0_reqh *reqh)
Definition: trigger_fom.c:84
op
Definition: libdemo.c:64
void(* fto_prepare)(struct m0_fom *fom)
Definition: trigger_fom.h:42
struct m0_fom tf_fom
Definition: trigger_fom.h:47
Definition: reqh.h:94
Definition: dump.c:103
Definition: fom.h:481
struct m0_reqh reqh
Definition: rm_foms.c:48
m0_trigger_phases
Definition: trigger_fom.h:52
uint64_t(* fto_progress)(struct m0_fom *fom, bool reinit_counter)
Definition: trigger_fom.h:41
static struct m0_fop * fop
Definition: item.c:57
const struct m0_fom_trigger_ops * tf_ops
Definition: trigger_fom.h:46
Definition: fop.h:79