Motr  M0
tx_group_fom.h
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 #pragma once
24 #ifndef __MOTR_BE_TX_GROUP_FOM_H__
25 #define __MOTR_BE_TX_GROUP_FOM_H__
26 
27 #include "lib/types.h" /* bool */
28 #include "lib/semaphore.h" /* m0_semaphore */
29 
30 #include "fop/fom.h" /* m0_fom */
31 #include "sm/sm.h" /* m0_sm_ast */
32 
33 #include "be/op.h" /* m0_be_op */
34 
35 struct m0_be_tx_group;
36 struct m0_reqh;
37 
45  struct m0_fom tgf_gen;
46  struct m0_reqh *tgf_reqh;
50  struct m0_be_op tgf_op;
57  bool tgf_stable;
65 };
66 
68 M0_INTERNAL void m0_be_tx_group_fom_init(struct m0_be_tx_group_fom *m,
69  struct m0_be_tx_group *gr,
70  struct m0_reqh *reqh);
71 M0_INTERNAL void m0_be_tx_group_fom_fini(struct m0_be_tx_group_fom *m);
72 M0_INTERNAL void m0_be_tx_group_fom_reset(struct m0_be_tx_group_fom *m);
73 
74 M0_INTERNAL int m0_be_tx_group_fom_start(struct m0_be_tx_group_fom *gf);
75 M0_INTERNAL void m0_be_tx_group_fom_stop(struct m0_be_tx_group_fom *gf);
76 
77 M0_INTERNAL void m0_be_tx_group_fom_handle(struct m0_be_tx_group_fom *m);
78 M0_INTERNAL void m0_be_tx_group_fom_stable(struct m0_be_tx_group_fom *gf);
79 
80 M0_INTERNAL struct m0_sm_group *
82 
83 M0_INTERNAL void
85 
86 M0_INTERNAL void m0_be_tx_group_fom_mod_init(void);
87 M0_INTERNAL void m0_be_tx_group_fom_mod_fini(void);
88 
90 #endif /* __MOTR_BE_TX_GROUP_FOM_H__ */
91 
92 /*
93  * Local variables:
94  * c-indentation-style: "K&R"
95  * c-basic-offset: 8
96  * tab-width: 8
97  * fill-column: 80
98  * scroll-step: 1
99  * End:
100  */
101 /*
102  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
103  */
M0_INTERNAL int m0_be_tx_group_fom_start(struct m0_be_tx_group_fom *gf)
Definition: tx_group_fom.c:381
struct m0_be_tx_group * tgf_group
Definition: tx_group_fom.h:48
static struct m0_addb2_mach * m
Definition: consumer.c:38
struct m0_reqh * tgf_reqh
Definition: tx_group_fom.h:46
M0_INTERNAL void m0_be_tx_group_fom_recovery_prepare(struct m0_be_tx_group_fom *m)
Definition: tx_group_fom.c:424
struct m0_semaphore tgf_start_sem
Definition: tx_group_fom.h:62
struct m0_be_op tgf_op
Definition: tx_group_fom.h:50
M0_INTERNAL void m0_be_tx_group_fom_stable(struct m0_be_tx_group_fom *gf)
Definition: tx_group_fom.c:412
Definition: sm.h:504
struct m0_sm_ast tgf_ast_handle
Definition: tx_group_fom.h:59
M0_INTERNAL void m0_be_tx_group_fom_mod_fini(void)
Definition: tx_group_fom.c:436
M0_INTERNAL void m0_be_tx_group_fom_reset(struct m0_be_tx_group_fom *m)
Definition: tx_group_fom.c:369
M0_INTERNAL void m0_be_tx_group_fom_mod_init(void)
Definition: tx_group_fom.c:429
struct m0_sm_ast tgf_ast_stop
Definition: tx_group_fom.h:61
M0_INTERNAL void m0_be_tx_group_fom_init(struct m0_be_tx_group_fom *m, struct m0_be_tx_group *gr, struct m0_reqh *reqh)
Definition: tx_group_fom.c:331
M0_INTERNAL struct m0_sm_group * m0_be_tx_group_fom__sm_group(struct m0_be_tx_group_fom *m)
Definition: tx_group_fom.c:418
struct m0_fom tgf_gen
Definition: tx_group_fom.h:45
Definition: reqh.h:94
struct m0_be_op tgf_op_gc
Definition: tx_group_fom.h:52
M0_INTERNAL void m0_be_tx_group_fom_stop(struct m0_be_tx_group_fom *gf)
Definition: tx_group_fom.c:399
Definition: fom.h:481
M0_INTERNAL void m0_be_tx_group_fom_fini(struct m0_be_tx_group_fom *m)
Definition: tx_group_fom.c:359
struct m0_semaphore tgf_finish_sem
Definition: tx_group_fom.h:63
struct m0_reqh reqh
Definition: rm_foms.c:48
struct m0_sm_ast tgf_ast_stable
Definition: tx_group_fom.h:60
Definition: op.h:74
M0_INTERNAL void m0_be_tx_group_fom_handle(struct m0_be_tx_group_fom *m)
Definition: tx_group_fom.c:407