Motr  M0
poolmach.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2020 Seagate Technology LLC and/or its Affiliates
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * For any questions about this software or licensing,
17  * please email opensource@seagate.com or cortx-questions@seagate.com.
18  *
19  */
20 
21 
22 #include "sns/repair.h"
23 
24 static const struct m0_persistent_sm_ops;
25 
31 M0_INTERNAL int m0_poolmach_init(struct m0_poolmach *pm, struct m0_dtm *dtm)
32 {
33  m0_persistent_sm_register(&pm->pm_mach, dtm,
35 }
36 
37 M0_INTERNAL void m0_poolmach_fini(struct m0_poolmach *pm)
38 {
39  m0_persistent_sm_unregister(&pm->pm_mach);
40 }
41 
42 M0_INTERNAL int m0_poolmach_device_join(struct m0_poolmach *pm,
43  struct m0_pooldev *dev)
44 {
45 }
46 
47 M0_INTERNAL int m0_poolmach_device_leave(struct m0_poolmach *pm,
48  struct m0_pooldev *dev)
49 {
50 }
51 
52 M0_INTERNAL int m0_poolmach_node_join(struct m0_poolmach *pm,
53  struct m0_poolnode *node)
54 {
55 }
56 
57 M0_INTERNAL int m0_poolmach_node_leave(struct m0_poolmach *pm,
58  struct m0_poolnode *node)
59 {
60 }
61 
69 static int poolmach_recover(struct m0_persistent_sm *pmach)
70 {
71  struct m0_poolmach *pm;
72 
73  pm = container_of(pmach, struct m0_poolmach, pm_mach);
74 }
75 
76 static const struct m0_persistent_sm_ops poolmach_persistent_sm_ops = {
77  .pso_recover = poolmach_recover
78 };
79 
80 /*
81  * Local variables:
82  * c-indentation-style: "K&R"
83  * c-basic-offset: 8
84  * tab-width: 8
85  * fill-column: 80
86  * scroll-step: 1
87  * End:
88  */
static struct net_test_cmd_node * node
Definition: commands.c:72
M0_INTERNAL int m0_poolmach_init(struct m0_poolmach *pm, struct m0_dtm *dtm)
Definition: poolmach.c:31
static int poolmach_recover(struct m0_persistent_sm *pmach)
Definition: poolmach.c:69
#define container_of(ptr, type, member)
Definition: misc.h:33
static const struct m0_persistent_sm_ops poolmach_persistent_sm_ops
Definition: poolmach.c:76
M0_INTERNAL int m0_poolmach_node_join(struct m0_poolmach *pm, struct m0_poolnode *node)
Definition: poolmach.c:52
M0_INTERNAL int m0_poolmach_node_leave(struct m0_poolmach *pm, struct m0_poolnode *node)
Definition: poolmach.c:57
M0_INTERNAL int m0_poolmach_device_join(struct m0_poolmach *pm, struct m0_pooldev *dev)
Definition: poolmach.c:42
M0_INTERNAL int m0_poolmach_device_leave(struct m0_poolmach *pm, struct m0_pooldev *dev)
Definition: poolmach.c:47
Definition: dtm.h:529
M0_INTERNAL void m0_poolmach_fini(struct m0_poolmach *pm)
Definition: poolmach.c:37