Motr  M0
pruner.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 #pragma once
23 
24 #ifndef __MOTR___DTM0_PRUNER_H__
25 #define __MOTR___DTM0_PRUNER_H__
26 
33 /*
34  * DTM0 log pruner overview
35  * ------------------------
36  *
37  * Pruner is a component responsible for removal of DTM0 log records that
38  * are no longer need (as per requirements for durability). There are two
39  * procedures in the cluster that makes log records redundant: stabilisation
40  * and eviction. In both cases, DTM0 log "unlinks" log records from originator's
41  * list and moves the record into the pruner list. Once a record linked to that
42  * list, it shall be eventually removed. The only difference between the cases
43  * is that eviction is forced from the pruner side. See the DTM0 log
44  * description for the details about these lists.
45  *
46  * Interaction with other components:
47  *
48  * +--------+ +-----+
49  * | Pruner | <--- STABLE/P --- | Log |
50  * | | ---- PRUNE -----> | |
51  * +--------+ +-----+
52  * /|\ +----+
53  * +------ F -----| HA |
54  * +----+
55  */
56 
58 };
59 
61 };
62 
63 M0_INTERNAL int m0_dtm0_pruner_init(struct m0_dtm0_pruner *dpn,
64  struct m0_dtm0_pruner_cfg *dpn_cfg);
65 M0_INTERNAL void m0_dtm0_pruner_fini(struct m0_dtm0_pruner *dpn);
66 M0_INTERNAL void m0_dtm0_pruner_start(struct m0_dtm0_pruner *dpn);
67 M0_INTERNAL void m0_dtm0_pruner_stop(struct m0_dtm0_pruner *dpn);
68 
69 
71 #endif /* __MOTR___DTM0_PRUNER_H__ */
72 
73 /*
74  * Local variables:
75  * c-indentation-style: "K&R"
76  * c-basic-offset: 8
77  * tab-width: 8
78  * fill-column: 80
79  * scroll-step: 1
80  * End:
81  */
82 /*
83  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
84  */
M0_INTERNAL void m0_dtm0_pruner_fini(struct m0_dtm0_pruner *dpn)
Definition: pruner.c:39
M0_INTERNAL void m0_dtm0_pruner_start(struct m0_dtm0_pruner *dpn)
Definition: pruner.c:43
M0_INTERNAL int m0_dtm0_pruner_init(struct m0_dtm0_pruner *dpn, struct m0_dtm0_pruner_cfg *dpn_cfg)
Definition: pruner.c:33
M0_INTERNAL void m0_dtm0_pruner_stop(struct m0_dtm0_pruner *dpn)
Definition: pruner.c:47