Motr  M0
domain.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 
24 #pragma once
25 
26 #ifndef __MOTR_DTM_DOMAIN_H__
27 #define __MOTR_DTM_DOMAIN_H__
28 
29 
36 #include "lib/tlist.h"
37 #include "fid/fid.h"
38 
39 #include "dtm/nucleus.h" /* m0_dtm_ver_t */
40 #include "dtm/history.h" /* m0_dtm_remote */
41 
42 
43 /* export */
44 struct m0_dtm_domain;
45 
46 struct m0_dtm_domain {
48  struct m0_fid dom_fid;
50  uint32_t dom_cohort_nr;
52 };
53 
56 };
57 
58 M0_INTERNAL int m0_dtm_domain_init(struct m0_dtm_domain *dom, uint32_t nr);
59 M0_INTERNAL void m0_dtm_domain_fini(struct m0_dtm_domain *dom);
60 
61 M0_INTERNAL void m0_dtm_domain_add(struct m0_dtm_domain *dom,
62  struct m0_dtm_domain_dest *dest);
63 M0_INTERNAL void m0_dtm_domain_open(struct m0_dtm_domain *dom);
64 M0_INTERNAL void m0_dtm_domain_close(struct m0_dtm_domain *dom);
65 M0_INTERNAL void m0_dtm_domain_connect(struct m0_dtm_domain *dom);
66 M0_INTERNAL void m0_dtm_domain_disconnect(struct m0_dtm_domain *dom);
67 
68 M0_INTERNAL void m0_dtm_domain_cohort_init(struct m0_dtm_domain_cohort *coh);
69 M0_INTERNAL void m0_dtm_domain_cohort_fini(struct m0_dtm_domain_cohort *coh);
70 M0_INTERNAL int m0_dtm_domain_cohort_open(struct m0_dtm_domain_cohort *coh);
71 M0_INTERNAL int m0_dtm_domain_cohort_restart(struct m0_dtm_domain_cohort *coh);
72 
75 #endif /* __MOTR_DTM_DOMAIN_H__ */
76 
77 
78 /*
79  * Local variables:
80  * c-indentation-style: "K&R"
81  * c-basic-offset: 8
82  * tab-width: 8
83  * fill-column: 80
84  * scroll-step: 1
85  * End:
86  */
87 /*
88  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
89  */
M0_INTERNAL void m0_dtm_domain_close(struct m0_dtm_domain *dom)
static size_t nr
Definition: dump.c:1505
struct m0_dtm_history dom_hi
Definition: domain.h:47
M0_INTERNAL int m0_dtm_domain_init(struct m0_dtm_domain *dom, uint32_t nr)
m0_dtm_ver_t dom_ver
Definition: domain.h:49
M0_INTERNAL int m0_dtm_domain_cohort_restart(struct m0_dtm_domain_cohort *coh)
struct m0_dtm_object dco_object
Definition: domain.h:55
M0_INTERNAL void m0_dtm_domain_fini(struct m0_dtm_domain *dom)
M0_INTERNAL void m0_dtm_domain_disconnect(struct m0_dtm_domain *dom)
struct m0_fid dom_fid
Definition: domain.h:48
uint64_t m0_dtm_ver_t
Definition: nucleus.h:48
M0_INTERNAL void m0_dtm_domain_open(struct m0_dtm_domain *dom)
static struct m0_stob_domain * dom
Definition: storage.c:38
M0_INTERNAL void m0_dtm_domain_cohort_fini(struct m0_dtm_domain_cohort *coh)
M0_INTERNAL int m0_dtm_domain_cohort_open(struct m0_dtm_domain_cohort *coh)
M0_INTERNAL void m0_dtm_domain_connect(struct m0_dtm_domain *dom)
Definition: fid.h:38
M0_INTERNAL void m0_dtm_domain_cohort_init(struct m0_dtm_domain_cohort *coh)
uint32_t dom_cohort_nr
Definition: domain.h:50
M0_INTERNAL void m0_dtm_domain_add(struct m0_dtm_domain *dom, struct m0_dtm_domain_dest *dest)
struct m0_dtm_remote ** dom_cohort
Definition: domain.h:51