Motr  M0
dtx.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_DTX_H__
27 #define __MOTR_DTM_DTX_H__
28 
29 
36 /* import */
37 #include "lib/types.h" /* m0_uint128, uint32_t, uint64_t */
38 struct m0_dtm_dtx_party;
39 struct m0_dtm;
40 
41 /* export */
42 struct m0_dtm_dtx;
43 
44 struct m0_dtm_dtx {
45  struct m0_dtm *dt_dtm;
46  struct m0_uint128 dt_id;
47  uint32_t dt_nr;
48  uint32_t dt_nr_max;
49  uint32_t dt_nr_fixed;
51 };
52 
54  struct m0_uint128 ds_id;
56 };
57 
58 M0_INTERNAL int m0_dtm_dtx_init(struct m0_dtm_dtx *dtx,
59  const struct m0_uint128 *id,
60  struct m0_dtm *dtm, uint32_t nr_max);
61 M0_INTERNAL void m0_dtm_dtx_fini(struct m0_dtm_dtx *dtx);
62 
63 M0_INTERNAL void m0_dtm_dtx_add(struct m0_dtm_dtx *dtx,
64  struct m0_dtm_oper *oper);
65 M0_INTERNAL void m0_dtm_dtx_close(struct m0_dtm_dtx *dtx);
66 
67 M0_EXTERN const struct m0_dtm_history_type m0_dtm_dtx_htype;
69 
72 #endif /* __MOTR_DTM_DTX_H__ */
73 
74 /*
75  * Local variables:
76  * c-indentation-style: "K&R"
77  * c-basic-offset: 8
78  * tab-width: 8
79  * fill-column: 80
80  * scroll-step: 1
81  * End:
82  */
83 /*
84  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
85  */
struct m0_dtm_dtx_party * dt_party
Definition: dtx.h:50
M0_EXTERN const struct m0_dtm_history_type m0_dtm_dtx_htype
Definition: dtx.h:67
struct m0_uint128 ds_id
Definition: dtx.h:54
uint32_t dt_nr
Definition: dtx.h:47
Definition: dtx.h:44
struct m0_dtm * dt_dtm
Definition: dtx.h:45
uint32_t dt_nr_max
Definition: dtx.h:48
M0_INTERNAL void m0_dtm_dtx_close(struct m0_dtm_dtx *dtx)
Definition: dtx.c:90
M0_INTERNAL int m0_dtm_dtx_init(struct m0_dtm_dtx *dtx, const struct m0_uint128 *id, struct m0_dtm *dtm, uint32_t nr_max)
Definition: dtx.c:57
struct m0_dtm_history ds_history
Definition: dtx.h:55
uint32_t dt_nr_fixed
Definition: dtx.h:49
M0_EXTERN const struct m0_dtm_history_type m0_dtm_dtx_srv_htype
Definition: dtx.h:68
Definition: dtm.h:529
M0_INTERNAL void m0_dtm_dtx_fini(struct m0_dtm_dtx *dtx)
Definition: dtx.c:69
M0_INTERNAL void m0_dtm_dtx_add(struct m0_dtm_dtx *dtx, struct m0_dtm_oper *oper)
Definition: dtx.c:80
struct m0_uint128 dt_id
Definition: dtx.h:46