Motr  M0
recovery.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2014-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_BE_RECOVERY_H__
26 #define __MOTR_BE_RECOVERY_H__
27 
28 #include "lib/tlist.h" /* m0_tl */
29 #include "lib/mutex.h" /* m0_mutex */
30 #include "lib/types.h" /* bool */
31 
56 struct m0_be_log;
58 
60  struct m0_be_log *brc_log;
61 };
62 
66  struct m0_tl brec_iters;
71 };
72 
73 M0_INTERNAL void m0_be_recovery_init(struct m0_be_recovery *rvr,
74  struct m0_be_recovery_cfg *cfg);
75 M0_INTERNAL void m0_be_recovery_fini(struct m0_be_recovery *rvr);
80 M0_INTERNAL int m0_be_recovery_run(struct m0_be_recovery *rvr);
81 
83 M0_INTERNAL bool
85 
92 M0_INTERNAL void
94  struct m0_be_log_record_iter *iter);
95 
98 #endif /* __MOTR_BE_RECOVERY_H__ */
99 
100 /*
101  * Local variables:
102  * c-indentation-style: "K&R"
103  * c-basic-offset: 8
104  * tab-width: 8
105  * fill-column: 80
106  * scroll-step: 1
107  * End:
108  */
109 /*
110  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
111  */
struct m0_tl brec_iters
Definition: recovery.h:66
M0_INTERNAL void m0_be_recovery_init(struct m0_be_recovery *rvr, struct m0_be_recovery_cfg *cfg)
Definition: recovery.c:150
M0_INTERNAL bool m0_be_recovery_log_record_available(struct m0_be_recovery *rvr)
Definition: recovery.c:310
m0_bcount_t brec_last_record_size
Definition: recovery.h:68
uint64_t m0_bindex_t
Definition: types.h:80
M0_INTERNAL void m0_be_recovery_fini(struct m0_be_recovery *rvr)
Definition: recovery.c:158
uint64_t m0_bcount_t
Definition: types.h:77
struct m0_mutex brec_lock
Definition: recovery.h:65
m0_bindex_t brec_discarded
Definition: recovery.h:70
m0_bindex_t brec_last_record_pos
Definition: recovery.h:67
Definition: tlist.h:251
struct m0_be_log * brc_log
Definition: recovery.h:60
struct m0_be_recovery_cfg brec_cfg
Definition: recovery.h:64
m0_bindex_t brec_current
Definition: recovery.h:69
M0_INTERNAL void m0_be_recovery_log_record_get(struct m0_be_recovery *rvr, struct m0_be_log_record_iter *iter)
Definition: recovery.c:322
Definition: log.h:261
M0_INTERNAL int m0_be_recovery_run(struct m0_be_recovery *rvr)
Definition: recovery.c:184
Definition: mutex.h:47