Motr  M0
ad_private_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from stob/ad_private.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "stob/ad_private.h"
8 #include "stob/ad_private_xc.h"
9 
10 #if !defined(__KERNEL__)
12 #endif
13 #if !defined(__KERNEL__)
15 #endif
16 #if !defined(__KERNEL__)
18 #endif
19 
20 #if !defined(__KERNEL__)
21 static struct _stob_ad_0type_rec_s {
25  ._type = {
27  .xct_name = "stob_ad_0type_rec",
28  .xct_sizeof = sizeof (struct stob_ad_0type_rec),
29  .xct_nr = 3,
30  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_BE,
31  }
32 };
33 
35 M0_BASSERT(offsetof(struct _stob_ad_0type_rec_s, _child[0]) ==
36  offsetof(struct m0_xcode_type, xct_child[0]));
37 #endif
38 
39 #if !defined(__KERNEL__)
40 static struct _stob_ad_rec_frag_seg_s {
44  ._type = {
46  .xct_name = "stob_ad_rec_frag_seg",
47  .xct_sizeof = sizeof (struct stob_ad_rec_frag_seg),
48  .xct_nr = 2,
49  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_BE,
50  }
51 };
52 
54 M0_BASSERT(offsetof(struct _stob_ad_rec_frag_seg_s, _child[0]) ==
55  offsetof(struct m0_xcode_type, xct_child[0]));
56 #endif
57 
58 #if !defined(__KERNEL__)
59 static struct _stob_ad_rec_frag_s {
63  ._type = {
65  .xct_name = "stob_ad_rec_frag",
66  .xct_sizeof = sizeof (struct stob_ad_rec_frag),
67  .xct_nr = 3,
68  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_BE,
69  }
70 };
71 
73 M0_BASSERT(offsetof(struct _stob_ad_rec_frag_s, _child[0]) ==
74  offsetof(struct m0_xcode_type, xct_child[0]));
75 #endif
76 
77 
78 #if !defined(__KERNEL__)
79 M0_BASSERT(sizeof(struct stob_ad_0type_rec) == 40U);
80 #endif
81 
82 #if !defined(__KERNEL__)
83 M0_BASSERT(sizeof ((struct stob_ad_0type_rec *)0)->sa0_header == 16U);
85 #endif
86 #if !defined(__KERNEL__)
87 M0_BASSERT(sizeof ((struct stob_ad_0type_rec *)0)->sa0_ad_domain == 8U);
89 #endif
90 #if !defined(__KERNEL__)
91 M0_BASSERT(sizeof ((struct stob_ad_0type_rec *)0)->sa0_footer == 16U);
93 #endif
94 
95 #if !defined(__KERNEL__)
96 M0_BASSERT(sizeof(struct stob_ad_rec_frag_seg) == 16U);
97 #endif
98 
99 #if !defined(__KERNEL__)
100 M0_BASSERT(sizeof ((struct stob_ad_rec_frag_seg *)0)->ps_segments == 4U);
102 #endif
103 #if !defined(__KERNEL__)
104 M0_BASSERT(sizeof ((struct stob_ad_rec_frag_seg *)0)->ps_old_data == 8U);
106 #endif
107 
108 #if !defined(__KERNEL__)
109 M0_BASSERT(sizeof(struct stob_ad_rec_frag) == 64U);
110 #endif
111 
112 #if !defined(__KERNEL__)
113 M0_BASSERT(sizeof ((struct stob_ad_rec_frag *)0)->arp_dom_id == 16U);
115 #endif
116 #if !defined(__KERNEL__)
117 M0_BASSERT(sizeof ((struct stob_ad_rec_frag *)0)->arp_stob_id == 32U);
119 #endif
120 #if !defined(__KERNEL__)
121 M0_BASSERT(sizeof ((struct stob_ad_rec_frag *)0)->arp_seg == 16U);
123 #endif
124 
125 
126 
127 #if !defined(__KERNEL__)
129 {
131  .xf_name = "sa0_header",
132 
133  .xf_type = m0_format_header_xc,
134 
135  .xf_tag = 0,
136  .xf_opaque = NULL,
137  .xf_offset = offsetof(struct stob_ad_0type_rec, sa0_header),
138  .xf_read = NULL,
139  .xf_decor = {
141  }
142  };
144 
146  .xf_name = "sa0_ad_domain",
147 
148  .xf_type = &M0_XT_U64,
149 
150  .xf_tag = 0,
151  .xf_opaque = NULL,
152  .xf_offset = offsetof(struct stob_ad_0type_rec, sa0_ad_domain),
153  .xf_read = NULL,
154  .xf_decor = {
156  }
157  };
158  m0_xc_u64_init();
159 
161  .xf_name = "sa0_footer",
162 
163  .xf_type = m0_format_footer_xc,
164 
165  .xf_tag = 0,
166  .xf_opaque = NULL,
167  .xf_offset = offsetof(struct stob_ad_0type_rec, sa0_footer),
168  .xf_read = NULL,
169  .xf_decor = {
171  }
172  };
174 
176 }
177 #endif
178 
179 #if !defined(__KERNEL__)
181 {
183  .xf_name = "ps_segments",
184 
185  .xf_type = &M0_XT_U32,
186 
187  .xf_tag = 0,
188  .xf_opaque = NULL,
189  .xf_offset = offsetof(struct stob_ad_rec_frag_seg, ps_segments),
190  .xf_read = NULL,
191  .xf_decor = {
193  }
194  };
195  m0_xc_u32_init();
196 
198  .xf_name = "ps_old_data",
199 #ifdef __KERNEL__
200  .xf_type = &M0_XT_VOID,
201 #else
202 
203  .xf_type = m0_be_emap_seg_xc,
204 #endif
205  .xf_tag = 0,
206  .xf_opaque = NULL,
207  .xf_offset = offsetof(struct stob_ad_rec_frag_seg, ps_old_data),
208  .xf_read = NULL,
209  .xf_decor = {
211  }
212  };
213 #if !defined(__KERNEL__)
215 #endif
216 
218 }
219 #endif
220 
221 #if !defined(__KERNEL__)
223 {
224  _stob_ad_rec_frag._child[0] = (struct m0_xcode_field) {
225  .xf_name = "arp_dom_id",
226 
227  .xf_type = m0_fid_xc,
228 
229  .xf_tag = 0,
230  .xf_opaque = NULL,
231  .xf_offset = offsetof(struct stob_ad_rec_frag, arp_dom_id),
232  .xf_read = NULL,
233  .xf_decor = {
235  }
236  };
238 
239  _stob_ad_rec_frag._child[1] = (struct m0_xcode_field) {
240  .xf_name = "arp_stob_id",
241 
242  .xf_type = m0_stob_id_xc,
243 
244  .xf_tag = 0,
245  .xf_opaque = NULL,
246  .xf_offset = offsetof(struct stob_ad_rec_frag, arp_stob_id),
247  .xf_read = NULL,
248  .xf_decor = {
250  }
251  };
253 
254  _stob_ad_rec_frag._child[2] = (struct m0_xcode_field) {
255  .xf_name = "arp_seg",
256 #ifdef __KERNEL__
257  .xf_type = &M0_XT_VOID,
258 #else
259 
260  .xf_type = stob_ad_rec_frag_seg_xc,
261 #endif
262  .xf_tag = 0,
263  .xf_opaque = NULL,
264  .xf_offset = offsetof(struct stob_ad_rec_frag, arp_seg),
265  .xf_read = NULL,
266  .xf_decor = {
268  }
269  };
270 #if !defined(__KERNEL__)
272 #endif
273 
275 }
276 #endif
277 
278 M0_INTERNAL void m0_xc_stob_ad_private_init(void)
279 {
280 #if !defined(__KERNEL__)
282 #endif
283 #if !defined(__KERNEL__)
285 #endif
286 #if !defined(__KERNEL__)
288 #endif
289 }
290 
291 M0_INTERNAL void m0_xc_stob_ad_private_fini(void)
292 {
293 }
struct m0_format_header sa0_header
Definition: ad_private.h:208
struct m0_xcode_type * stob_ad_0type_rec_xc
Definition: ad_private_xc.c:11
#define NULL
Definition: misc.h:38
M0_INTERNAL void m0_xc_stob_ad_private_fini(void)
M0_INTERNAL void m0_xc_m0_stob_id_struct_init(void)
Definition: stob_xc.c:39
M0_INTERNAL void m0_xc_m0_format_footer_struct_init(void)
Definition: format_xc.c:226
M0_INTERNAL void m0_xc_stob_ad_private_init(void)
struct m0_stob_id arp_stob_id
Definition: ad_private.h:209
struct m0_xcode_type _type
Definition: ad_private_xc.c:60
static struct _stob_ad_rec_frag_seg_s _stob_ad_rec_frag_seg
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
M0_INTERNAL void m0_xc_m0_fid_struct_init(void)
Definition: fid_xc.c:64
struct m0_xcode_type * m0_stob_id_xc
Definition: stob_xc.c:10
uint32_t ps_segments
Definition: ad_private.h:208
M0_INTERNAL void m0_xc_stob_ad_0type_rec_struct_init(void)
struct m0_xcode_type * stob_ad_rec_frag_seg_xc
Definition: ad_private_xc.c:14
struct stob_ad_rec_frag_seg arp_seg
Definition: ad_private.h:210
struct m0_xcode_field _child[3]
Definition: ad_private_xc.c:61
struct m0_xcode_field _child[3]
Definition: ad_private_xc.c:23
struct m0_stob_ad_domain * sa0_ad_domain
Definition: ad_private.h:210
const struct m0_xcode_type M0_XT_VOID
Definition: xcode.c:916
M0_INTERNAL void m0_xc_stob_ad_rec_frag_struct_init(void)
struct m0_xcode_type _type
Definition: ad_private_xc.c:41
#define M0_POST(cond)
bool m0_xcode_type_invariant(const struct m0_xcode_type *xt)
Definition: xcode.c:74
M0_INTERNAL void m0_xc_m0_format_header_struct_init(void)
Definition: format_xc.c:191
M0_INTERNAL void m0_xc_stob_ad_rec_frag_seg_struct_init(void)
void m0_xc_u64_init(void)
Definition: xcode.c:904
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
struct m0_xcode_type * m0_format_header_xc
Definition: format_xc.c:10
struct m0_format_footer sa0_footer
Definition: ad_private.h:211
struct m0_xcode_field _child[2]
Definition: ad_private_xc.c:42
static struct _stob_ad_rec_frag_s _stob_ad_rec_frag
struct m0_be_emap_seg * ps_old_data
Definition: ad_private.h:209
struct m0_xcode_type * stob_ad_rec_frag_xc
Definition: ad_private_xc.c:17
void m0_xc_u32_init(void)
Definition: xcode.c:900
const char * xf_name
Definition: xcode.h:251
M0_INTERNAL void m0_xc_m0_be_emap_seg_struct_init(void)
Definition: extmap_xc.c:58
struct m0_xcode_type * m0_fid_xc
Definition: fid_xc.c:10
struct m0_fid arp_dom_id
Definition: ad_private.h:208
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
static struct _stob_ad_0type_rec_s _stob_ad_0type_rec
#define offsetof(typ, memb)
Definition: misc.h:29
M0_BASSERT(offsetof(struct _stob_ad_0type_rec_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
struct m0_xcode_type _type
Definition: ad_private_xc.c:22
struct m0_xcode_type * m0_be_emap_seg_xc
Definition: extmap_xc.c:11
struct m0_xcode_type * m0_format_footer_xc
Definition: format_xc.c:11