Motr  M0
extmap_internal_xc.c
Go to the documentation of this file.
1 /* This file is automatically generated from be/extmap_internal.h */
2 
3 #include "lib/misc.h" /* offsetof */
4 #include "lib/assert.h"
5 #include "xcode/xcode.h"
6 
7 #include "be/extmap_internal.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 _m0_be_emap_key_s {
24 } _m0_be_emap_key = {
25  ._type = {
27  .xct_name = "m0_be_emap_key",
28  .xct_sizeof = sizeof (struct m0_be_emap_key),
29  .xct_nr = 4,
30  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_BE,
31  }
32 };
33 
35 M0_BASSERT(offsetof(struct _m0_be_emap_key_s, _child[0]) ==
36  offsetof(struct m0_xcode_type, xct_child[0]));
37 #endif
38 
39 #if !defined(__KERNEL__)
40 static struct _m0_be_emap_rec_s {
43 } _m0_be_emap_rec = {
44  ._type = {
46  .xct_name = "m0_be_emap_rec",
47  .xct_sizeof = sizeof (struct m0_be_emap_rec),
48  .xct_nr = 6,
49  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_BE,
50  }
51 };
52 
54 M0_BASSERT(offsetof(struct _m0_be_emap_rec_s, _child[0]) ==
55  offsetof(struct m0_xcode_type, xct_child[0]));
56 #endif
57 
58 #if !defined(__KERNEL__)
59 static struct _m0_be_emap_s {
61  struct m0_xcode_field _child[10];
62 } _m0_be_emap = {
63  ._type = {
65  .xct_name = "m0_be_emap",
66  .xct_sizeof = sizeof (struct m0_be_emap),
67  .xct_nr = 10,
68  .xct_flags = M0_XCODE_TYPE_FLAG_DOM_BE,
69  }
70 };
71 
73 M0_BASSERT(offsetof(struct _m0_be_emap_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 m0_be_emap_key) == 56U);
80 #endif
81 
82 #if !defined(__KERNEL__)
83 M0_BASSERT(sizeof ((struct m0_be_emap_key *)0)->ek_header == 16U);
85 #endif
86 #if !defined(__KERNEL__)
87 M0_BASSERT(sizeof ((struct m0_be_emap_key *)0)->ek_prefix == 16U);
89 #endif
90 #if !defined(__KERNEL__)
91 M0_BASSERT(sizeof ((struct m0_be_emap_key *)0)->ek_offset == 8U);
93 #endif
94 #if !defined(__KERNEL__)
95 M0_BASSERT(sizeof ((struct m0_be_emap_key *)0)->ek_footer == 16U);
97 #endif
98 
99 #if !defined(__KERNEL__)
100 M0_BASSERT(sizeof(struct m0_be_emap_rec) == 64U);
101 #endif
102 
103 #if !defined(__KERNEL__)
104 M0_BASSERT(sizeof ((struct m0_be_emap_rec *)0)->er_header == 16U);
106 #endif
107 #if !defined(__KERNEL__)
108 M0_BASSERT(sizeof ((struct m0_be_emap_rec *)0)->er_start == 8U);
109 M0_BASSERT(offsetof(struct m0_be_emap_rec, er_start) == 16U);
110 #endif
111 #if !defined(__KERNEL__)
112 M0_BASSERT(sizeof ((struct m0_be_emap_rec *)0)->er_value == 8U);
113 M0_BASSERT(offsetof(struct m0_be_emap_rec, er_value) == 24U);
114 #endif
115 #if !defined(__KERNEL__)
116 M0_BASSERT(sizeof ((struct m0_be_emap_rec *)0)->er_unit_size == 8U);
118 #endif
119 #if !defined(__KERNEL__)
120 M0_BASSERT(sizeof ((struct m0_be_emap_rec *)0)->er_cksum_nob == 4U);
122 #endif
123 #if !defined(__KERNEL__)
124 M0_BASSERT(sizeof ((struct m0_be_emap_rec *)0)->er_footer == 16U);
126 #endif
127 
128 #if !defined(__KERNEL__)
129 M0_BASSERT(sizeof(struct m0_be_emap) == 600U);
130 #endif
131 
132 #if !defined(__KERNEL__)
133 M0_BASSERT(sizeof ((struct m0_be_emap *)0)->em_header == 16U);
134 M0_BASSERT(offsetof(struct m0_be_emap, em_header) == 0U);
135 #endif
136 #if !defined(__KERNEL__)
137 M0_BASSERT(sizeof ((struct m0_be_emap *)0)->em_footer == 16U);
138 M0_BASSERT(offsetof(struct m0_be_emap, em_footer) == 16U);
139 #endif
140 #if !defined(__KERNEL__)
141 M0_BASSERT(sizeof ((struct m0_be_emap *)0)->em_mapping == 256U);
142 M0_BASSERT(offsetof(struct m0_be_emap, em_mapping) == 32U);
143 #endif
144 #if !defined(__KERNEL__)
145 M0_BASSERT(sizeof ((struct m0_be_emap *)0)->em_version == 8U);
146 M0_BASSERT(offsetof(struct m0_be_emap, em_version) == 288U);
147 #endif
148 #if !defined(__KERNEL__)
149 M0_BASSERT(sizeof ((struct m0_be_emap *)0)->em_seg == 8U);
150 M0_BASSERT(offsetof(struct m0_be_emap, em_seg) == 296U);
151 #endif
152 #if !defined(__KERNEL__)
153 M0_BASSERT(sizeof ((struct m0_be_emap *)0)->em_lock == 144U);
154 M0_BASSERT(offsetof(struct m0_be_emap, em_lock) == 304U);
155 #endif
156 #if !defined(__KERNEL__)
157 M0_BASSERT(sizeof ((struct m0_be_emap *)0)->em_key_buf == 16U);
158 M0_BASSERT(offsetof(struct m0_be_emap, em_key_buf) == 448U);
159 #endif
160 #if !defined(__KERNEL__)
161 M0_BASSERT(sizeof ((struct m0_be_emap *)0)->em_val_buf == 16U);
162 M0_BASSERT(offsetof(struct m0_be_emap, em_val_buf) == 464U);
163 #endif
164 #if !defined(__KERNEL__)
165 M0_BASSERT(sizeof ((struct m0_be_emap *)0)->em_key == 56U);
166 M0_BASSERT(offsetof(struct m0_be_emap, em_key) == 480U);
167 #endif
168 #if !defined(__KERNEL__)
169 M0_BASSERT(sizeof ((struct m0_be_emap *)0)->em_rec == 64U);
170 M0_BASSERT(offsetof(struct m0_be_emap, em_rec) == 536U);
171 #endif
172 
173 
174 
175 #if !defined(__KERNEL__)
176 M0_INTERNAL void m0_xc_m0_be_emap_key_struct_init(void)
177 {
178  _m0_be_emap_key._child[0] = (struct m0_xcode_field) {
179  .xf_name = "ek_header",
180 
181  .xf_type = m0_format_header_xc,
182 
183  .xf_tag = 0,
184  .xf_opaque = NULL,
185  .xf_offset = offsetof(struct m0_be_emap_key, ek_header),
186  .xf_read = NULL,
187  .xf_decor = {
189  }
190  };
192 
193  _m0_be_emap_key._child[1] = (struct m0_xcode_field) {
194  .xf_name = "ek_prefix",
195 
196  .xf_type = m0_uint128_xc,
197 
198  .xf_tag = 0,
199  .xf_opaque = NULL,
200  .xf_offset = offsetof(struct m0_be_emap_key, ek_prefix),
201  .xf_read = NULL,
202  .xf_decor = {
204  }
205  };
207 
208  _m0_be_emap_key._child[2] = (struct m0_xcode_field) {
209  .xf_name = "ek_offset",
210 
211  .xf_type = &M0_XT_U64,
212 
213  .xf_tag = 0,
214  .xf_opaque = NULL,
215  .xf_offset = offsetof(struct m0_be_emap_key, ek_offset),
216  .xf_read = NULL,
217  .xf_decor = {
219  }
220  };
221  m0_xc_u64_init();
222 
223  _m0_be_emap_key._child[3] = (struct m0_xcode_field) {
224  .xf_name = "ek_footer",
225 
226  .xf_type = m0_format_footer_xc,
227 
228  .xf_tag = 0,
229  .xf_opaque = NULL,
230  .xf_offset = offsetof(struct m0_be_emap_key, ek_footer),
231  .xf_read = NULL,
232  .xf_decor = {
234  }
235  };
237 
239 }
240 #endif
241 
242 #if !defined(__KERNEL__)
243 M0_INTERNAL void m0_xc_m0_be_emap_rec_struct_init(void)
244 {
245  _m0_be_emap_rec._child[0] = (struct m0_xcode_field) {
246  .xf_name = "er_header",
247 
248  .xf_type = m0_format_header_xc,
249 
250  .xf_tag = 0,
251  .xf_opaque = NULL,
252  .xf_offset = offsetof(struct m0_be_emap_rec, er_header),
253  .xf_read = NULL,
254  .xf_decor = {
256  }
257  };
259 
260  _m0_be_emap_rec._child[1] = (struct m0_xcode_field) {
261  .xf_name = "er_start",
262 
263  .xf_type = &M0_XT_U64,
264 
265  .xf_tag = 0,
266  .xf_opaque = NULL,
267  .xf_offset = offsetof(struct m0_be_emap_rec, er_start),
268  .xf_read = NULL,
269  .xf_decor = {
271  }
272  };
273  m0_xc_u64_init();
274 
275  _m0_be_emap_rec._child[2] = (struct m0_xcode_field) {
276  .xf_name = "er_value",
277 
278  .xf_type = &M0_XT_U64,
279 
280  .xf_tag = 0,
281  .xf_opaque = NULL,
282  .xf_offset = offsetof(struct m0_be_emap_rec, er_value),
283  .xf_read = NULL,
284  .xf_decor = {
286  }
287  };
288  m0_xc_u64_init();
289 
290  _m0_be_emap_rec._child[3] = (struct m0_xcode_field) {
291  .xf_name = "er_unit_size",
292 
293  .xf_type = &M0_XT_U64,
294 
295  .xf_tag = 0,
296  .xf_opaque = NULL,
297  .xf_offset = offsetof(struct m0_be_emap_rec, er_unit_size),
298  .xf_read = NULL,
299  .xf_decor = {
301  }
302  };
303  m0_xc_u64_init();
304 
305  _m0_be_emap_rec._child[4] = (struct m0_xcode_field) {
306  .xf_name = "er_cksum_nob",
307 
308  .xf_type = &M0_XT_U32,
309 
310  .xf_tag = 0,
311  .xf_opaque = NULL,
312  .xf_offset = offsetof(struct m0_be_emap_rec, er_cksum_nob),
313  .xf_read = NULL,
314  .xf_decor = {
316  }
317  };
318  m0_xc_u32_init();
319 
320  _m0_be_emap_rec._child[5] = (struct m0_xcode_field) {
321  .xf_name = "er_footer",
322 
323  .xf_type = m0_format_footer_xc,
324 
325  .xf_tag = 0,
326  .xf_opaque = NULL,
327  .xf_offset = offsetof(struct m0_be_emap_rec, er_footer),
328  .xf_read = NULL,
329  .xf_decor = {
331  }
332  };
334 
336 }
337 #endif
338 
339 #if !defined(__KERNEL__)
340 M0_INTERNAL void m0_xc_m0_be_emap_struct_init(void)
341 {
342  _m0_be_emap._child[0] = (struct m0_xcode_field) {
343  .xf_name = "em_header",
344 
345  .xf_type = m0_format_header_xc,
346 
347  .xf_tag = 0,
348  .xf_opaque = NULL,
349  .xf_offset = offsetof(struct m0_be_emap, em_header),
350  .xf_read = NULL,
351  .xf_decor = {
353  }
354  };
356 
357  _m0_be_emap._child[1] = (struct m0_xcode_field) {
358  .xf_name = "em_footer",
359 
360  .xf_type = m0_format_footer_xc,
361 
362  .xf_tag = 0,
363  .xf_opaque = NULL,
364  .xf_offset = offsetof(struct m0_be_emap, em_footer),
365  .xf_read = NULL,
366  .xf_decor = {
368  }
369  };
371 
372  _m0_be_emap._child[2] = (struct m0_xcode_field) {
373  .xf_name = "em_mapping",
374 #ifdef __KERNEL__
375  .xf_type = &M0_XT_VOID,
376 #else
377 
378  .xf_type = m0_be_btree_xc,
379 #endif
380  .xf_tag = 0,
381  .xf_opaque = NULL,
382  .xf_offset = offsetof(struct m0_be_emap, em_mapping),
383  .xf_read = NULL,
384  .xf_decor = {
386  }
387  };
388 #if !defined(__KERNEL__)
390 #endif
391 
392  _m0_be_emap._child[3] = (struct m0_xcode_field) {
393  .xf_name = "em_version",
394 
395  .xf_type = &M0_XT_U64,
396 
397  .xf_tag = 0,
398  .xf_opaque = NULL,
399  .xf_offset = offsetof(struct m0_be_emap, em_version),
400  .xf_read = NULL,
401  .xf_decor = {
403  }
404  };
405  m0_xc_u64_init();
406 
407  _m0_be_emap._child[4] = (struct m0_xcode_field) {
408  .xf_name = "em_seg",
409 
410  .xf_type = &M0_XT_U64,
411 
412  .xf_tag = 0,
413  .xf_opaque = NULL,
414  .xf_offset = offsetof(struct m0_be_emap, em_seg),
415  .xf_read = NULL,
416  .xf_decor = {
418  }
419  };
420  m0_xc_u64_init();
421 
422  _m0_be_emap._child[5] = (struct m0_xcode_field) {
423  .xf_name = "em_lock",
424 #ifdef __KERNEL__
425  .xf_type = &M0_XT_VOID,
426 #else
427 
428  .xf_type = m0_be_rwlock_xc,
429 #endif
430  .xf_tag = 0,
431  .xf_opaque = NULL,
432  .xf_offset = offsetof(struct m0_be_emap, em_lock),
433  .xf_read = NULL,
434  .xf_decor = {
436  }
437  };
438 #if !defined(__KERNEL__)
440 #endif
441 
442  _m0_be_emap._child[6] = (struct m0_xcode_field) {
443  .xf_name = "em_key_buf",
444 
445  .xf_type = m0_buf_xc,
446 
447  .xf_tag = 0,
448  .xf_opaque = NULL,
449  .xf_offset = offsetof(struct m0_be_emap, em_key_buf),
450  .xf_read = NULL,
451  .xf_decor = {
453  }
454  };
456 
457  _m0_be_emap._child[7] = (struct m0_xcode_field) {
458  .xf_name = "em_val_buf",
459 
460  .xf_type = m0_buf_xc,
461 
462  .xf_tag = 0,
463  .xf_opaque = NULL,
464  .xf_offset = offsetof(struct m0_be_emap, em_val_buf),
465  .xf_read = NULL,
466  .xf_decor = {
468  }
469  };
471 
472  _m0_be_emap._child[8] = (struct m0_xcode_field) {
473  .xf_name = "em_key",
474 #ifdef __KERNEL__
475  .xf_type = &M0_XT_VOID,
476 #else
477 
478  .xf_type = m0_be_emap_key_xc,
479 #endif
480  .xf_tag = 0,
481  .xf_opaque = NULL,
482  .xf_offset = offsetof(struct m0_be_emap, em_key),
483  .xf_read = NULL,
484  .xf_decor = {
486  }
487  };
488 #if !defined(__KERNEL__)
490 #endif
491 
492  _m0_be_emap._child[9] = (struct m0_xcode_field) {
493  .xf_name = "em_rec",
494 #ifdef __KERNEL__
495  .xf_type = &M0_XT_VOID,
496 #else
497 
498  .xf_type = m0_be_emap_rec_xc,
499 #endif
500  .xf_tag = 0,
501  .xf_opaque = NULL,
502  .xf_offset = offsetof(struct m0_be_emap, em_rec),
503  .xf_read = NULL,
504  .xf_decor = {
506  }
507  };
508 #if !defined(__KERNEL__)
510 #endif
511 
513 }
514 #endif
515 
516 M0_INTERNAL void m0_xc_be_extmap_internal_init(void)
517 {
518 #if !defined(__KERNEL__)
520 #endif
521 #if !defined(__KERNEL__)
523 #endif
524 #if !defined(__KERNEL__)
526 #endif
527 }
528 
529 M0_INTERNAL void m0_xc_be_extmap_internal_fini(void)
530 {
531 }
struct m0_xcode_type _type
struct m0_xcode_type * m0_buf_xc
Definition: buf_xc.c:10
M0_INTERNAL void m0_xc_m0_be_rwlock_struct_init(void)
Definition: format_xc.c:284
struct m0_format_footer er_footer
#define NULL
Definition: misc.h:38
M0_BASSERT(offsetof(struct _m0_be_emap_key_s, _child[0])==offsetof(struct m0_xcode_type, xct_child[0]))
M0_INTERNAL void m0_xc_m0_format_footer_struct_init(void)
Definition: format_xc.c:226
M0_INTERNAL void m0_xc_m0_be_emap_struct_init(void)
struct m0_xcode_type * m0_uint128_xc
Definition: types_xc.c:10
struct m0_xcode_type * m0_be_btree_xc
Definition: btree_xc.c:11
struct m0_xcode_type * m0_be_emap_rec_xc
m0_bindex_t ek_offset
struct m0_xcode_field xct_child[0]
Definition: xcode.h:345
struct m0_uint128 ek_prefix
M0_INTERNAL void m0_xc_m0_uint128_struct_init(void)
Definition: types_xc.c:39
struct m0_xcode_type _type
M0_INTERNAL void m0_xc_m0_be_btree_struct_init(void)
Definition: btree_xc.c:141
M0_INTERNAL void m0_xc_m0_buf_struct_init(void)
Definition: buf_xc.c:64
struct m0_buf em_key_buf
struct m0_buf em_val_buf
struct m0_xcode_field _child[10]
struct m0_be_emap_rec em_rec
struct m0_be_emap_key em_key
uint64_t er_value
struct m0_xcode_type * m0_be_emap_key_xc
M0_INTERNAL void m0_xc_be_extmap_internal_init(void)
struct m0_xcode_field _child[6]
struct m0_xcode_type _type
const struct m0_xcode_type M0_XT_VOID
Definition: xcode.c:916
struct m0_format_header em_header
struct m0_xcode_field _child[4]
static struct _m0_be_emap_rec_s _m0_be_emap_rec
M0_INTERNAL void m0_xc_be_extmap_internal_fini(void)
#define M0_POST(cond)
m0_bindex_t er_start
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
struct m0_format_header er_header
void m0_xc_u64_init(void)
Definition: xcode.c:904
uint32_t er_cksum_nob
m0_bindex_t er_unit_size
const struct m0_xcode_type M0_XT_U32
Definition: xcode.c:932
M0_INTERNAL void m0_xc_m0_be_emap_key_struct_init(void)
enum m0_xcode_aggr xct_aggr
Definition: xcode.h:316
static struct _m0_be_emap_key_s _m0_be_emap_key
struct m0_xcode_type * m0_format_header_xc
Definition: format_xc.c:10
uint64_t em_version
struct m0_xcode_type * m0_be_emap_xc
M0_INTERNAL void m0_xc_m0_be_emap_rec_struct_init(void)
struct m0_be_seg * em_seg
void m0_xc_u32_init(void)
Definition: xcode.c:900
struct m0_format_footer ek_footer
const char * xf_name
Definition: xcode.h:251
struct m0_be_btree em_mapping
const struct m0_xcode_type M0_XT_U64
Definition: xcode.c:940
struct m0_format_header ek_header
#define offsetof(typ, memb)
Definition: misc.h:29
struct m0_format_footer em_footer
static struct _m0_be_emap_s _m0_be_emap
struct m0_be_rwlock em_lock
struct m0_xcode_type * m0_be_rwlock_xc
Definition: format_xc.c:16
struct m0_xcode_type * m0_format_footer_xc
Definition: format_xc.c:11