Motr
M0
list_enum.h
Go to the documentation of this file.
1
/* -*- C -*- */
2
/*
3
* Copyright (c) 2012-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_LAYOUT_LIST_ENUM_H__
26
#define __MOTR_LAYOUT_LIST_ENUM_H__
27
36
/* import */
37
#include "
lib/arith.h
"
/* M0_IS_8ALIGNED */
38
#include "
layout/layout.h
"
39
40
struct
m0_fid
;
41
42
/* export */
43
struct
m0_layout_list_enum
;
44
46
struct
m0_layout_list_enum
{
48
struct
m0_layout_enum
lle_base
;
49
51
uint32_t
lle_nr
;
52
61
struct
m0_fid
*
lle_list_of_cobs
;
62
63
uint64_t
lle_magic
;
64
};
65
79
M0_INTERNAL
int
m0_list_enum_build
(
struct
m0_layout_domain
*
dom
,
80
struct
m0_fid
*cob_list, uint32_t
nr
,
81
struct
m0_layout_list_enum
**
out
);
82
83
extern
struct
m0_layout_enum_type
m0_list_enum_type
;
84
96
struct
cob_entries_header
{
98
uint32_t
ces_nr
;
99
101
uint32_t
ces_pad
;
102
107
char
ces_cobs
[0];
108
};
109
M0_BASSERT
(
M0_IS_8ALIGNED
(
sizeof
(
struct
cob_entries_header
)));
110
111
/* __MOTR_LAYOUT_LIST_ENUM_H__ */
112
#endif
113
114
/*
115
* Local variables:
116
* c-indentation-style: "K&R"
117
* c-basic-offset: 8
118
* tab-width: 8
119
* fill-column: 80
120
* scroll-step: 1
121
* End:
122
*/
nr
static size_t nr
Definition:
dump.c:1505
M0_BASSERT
M0_BASSERT(M0_IS_8ALIGNED(sizeof(struct cob_entries_header)))
arith.h
m0_layout_list_enum::lle_base
struct m0_layout_enum lle_base
Definition:
list_enum.h:48
m0_layout_list_enum::lle_magic
uint64_t lle_magic
Definition:
list_enum.h:63
cob_entries_header::ces_cobs
char ces_cobs[0]
Definition:
list_enum.h:107
m0_layout_list_enum
Definition:
list_enum.h:46
cob_entries_header
Definition:
list_enum.h:96
m0_layout_enum_type
Definition:
layout.h:525
dom
static struct m0_stob_domain * dom
Definition:
storage.c:38
m0_list_enum_build
M0_INTERNAL int m0_list_enum_build(struct m0_layout_domain *dom, struct m0_fid *cob_list, uint32_t nr, struct m0_layout_list_enum **out)
Definition:
list_enum.c:191
cob_entries_header::ces_nr
uint32_t ces_nr
Definition:
list_enum.h:98
m0_layout_list_enum::lle_nr
uint32_t lle_nr
Definition:
list_enum.h:51
m0_layout_enum
Definition:
layout.h:407
m0_fid
Definition:
fid.h:38
layout.h
m0_layout_list_enum::lle_list_of_cobs
struct m0_fid * lle_list_of_cobs
Definition:
list_enum.h:61
M0_IS_8ALIGNED
#define M0_IS_8ALIGNED(val)
Definition:
arith.h:190
out
#define out(...)
Definition:
gen.c:41
cob_entries_header::ces_pad
uint32_t ces_pad
Definition:
list_enum.h:101
m0_layout_domain
Definition:
layout.h:194
m0_list_enum_type
struct m0_layout_enum_type m0_list_enum_type
Definition:
list_enum.c:706
layout
list_enum.h
Generated on Thu Apr 14 2022 14:02:56 for Motr by
1.8.14