Motr  M0
link_fops.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2016-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_HA_LINK_FOPS_H__
26 #define __MOTR_HA_LINK_FOPS_H__
27 
28 #include "lib/types.h" /* m0_uint128 */
29 #include "xcode/xcode_attr.h" /* M0_XCA_RECORD */
30 #include "fop/fop.h" /* m0_fop_type */
31 #include "ha/msg.h" /* m0_ha_msg */
32 
33 #include "lib/types_xc.h" /* m0_uint128_xc */
34 #include "ha/msg_xc.h" /* m0_ha_msg_xc */
35 
43  uint64_t hlt_confirmed;
44  uint64_t hlt_delivered;
45  uint64_t hlt_next;
46  uint64_t hlt_assign;
47 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
48 
50  uint64_t lmf_msg_nr;
55  uint64_t lmf_out_next;
56  uint64_t lmf_in_delivered;
58  uint64_t lmf_seq;
59 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
60 
62  int32_t lmr_rc;
63  uint64_t lmr_out_next;
64  uint64_t lmr_in_delivered;
65 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
66 
73 } M0_XCA_RECORD M0_XCA_DOMAIN(rpc);
74 
75 #define HLTAGS_F "(confirmed=%" PRIu64 " delivered=%" PRIu64 \
76  " next=%" PRIu64 " assign=%" PRIu64 ")"
77 #define HLTAGS_P(_tags) (_tags)->hlt_confirmed, (_tags)->hlt_delivered, \
78  (_tags)->hlt_next, (_tags)->hlt_assign
79 
80 M0_INTERNAL void m0_ha_link_tags_initial(struct m0_ha_link_tags *tags,
81  bool tag_even);
82 M0_INTERNAL bool m0_ha_link_tags_eq(const struct m0_ha_link_tags *tags1,
83  const struct m0_ha_link_tags *tags2);
84 M0_INTERNAL void m0_ha_link_params_invert(struct m0_ha_link_params *dst,
85  const struct m0_ha_link_params *src);
86 
87 extern struct m0_fop_type m0_ha_link_msg_fopt;
89 
90 M0_INTERNAL int m0_ha_link_fops_init(void);
91 M0_INTERNAL void m0_ha_link_fops_fini(void);
92 
94 #endif /* __MOTR_HA_LINK_FOPS_H__ */
95 
96 /*
97  * Local variables:
98  * c-indentation-style: "K&R"
99  * c-basic-offset: 8
100  * tab-width: 8
101  * fill-column: 80
102  * scroll-step: 1
103  * End:
104  */
105 /*
106  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
107  */
static struct m0_bufvec dst
Definition: xform.c:61
M0_INTERNAL void m0_ha_link_fops_fini(void)
Definition: link_fops.c:98
struct m0_fop_type m0_ha_link_msg_rep_fopt
Definition: link_fops.c:42
M0_INTERNAL int m0_ha_link_fops_init(void)
Definition: link_fops.c:79
M0_INTERNAL void m0_ha_link_params_invert(struct m0_ha_link_params *dst, const struct m0_ha_link_params *src)
Definition: link_fops.c:67
Definition: msg.h:115
#define M0_XCA_DOMAIN(value)
Definition: xcode_attr.h:72
M0_INTERNAL void m0_ha_link_tags_initial(struct m0_ha_link_tags *tags, bool tag_even)
Definition: link_fops.c:44
M0_INTERNAL bool m0_ha_link_tags_eq(const struct m0_ha_link_tags *tags1, const struct m0_ha_link_tags *tags2)
Definition: link_fops.c:57
struct m0_pdclust_src_addr src
Definition: fd.c:108
struct m0_fop_type m0_ha_link_msg_fopt
Definition: link_fops.c:41