Motr  M0
layout_db.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_LAYOUT_DB_H__
26 #define __MOTR_LAYOUT_LAYOUT_DB_H__
27 
86 /* import */
87 #include "layout/layout.h"
88 
132 M0_INTERNAL int m0_layout_lookup(struct m0_layout_domain *dom,
133  uint64_t lid,
134  struct m0_layout_type *lt,
135  struct m0_db_tx *tx,
136  struct m0_db_pair *pair,
137  struct m0_layout **out);
138 
153 M0_INTERNAL int m0_layout_add(struct m0_layout *l,
154  struct m0_db_tx *tx, struct m0_db_pair *pair);
155 
176 M0_INTERNAL int m0_layout_update(struct m0_layout *l,
177  struct m0_db_tx *tx, struct m0_db_pair *pair);
178 
192 M0_INTERNAL int m0_layout_delete(struct m0_layout *l,
193  struct m0_db_tx *tx, struct m0_db_pair *pair);
194 
195 M0_INTERNAL void m0_layout_pair_set(struct m0_db_pair *pair, uint64_t *lid,
196  void *area, m0_bcount_t num_bytes);
199 #endif /* __MOTR_LAYOUT_LAYOUT_DB_H__ */
200 
201 /*
202  * Local variables:
203  * c-indentation-style: "K&R"
204  * c-basic-offset: 8
205  * tab-width: 8
206  * fill-column: 79
207  * scroll-step: 1
208  * End:
209  */
M0_INTERNAL int m0_layout_update(struct m0_layout *l, struct m0_db_tx *tx, struct m0_db_pair *pair)
Definition: layout_db.c:570
uint64_t m0_bcount_t
Definition: types.h:77
M0_INTERNAL int m0_layout_delete(struct m0_layout *l, struct m0_db_tx *tx, struct m0_db_pair *pair)
Definition: layout_db.c:601
M0_INTERNAL void m0_layout_add(struct m0_layout_domain *dom, struct m0_layout *l)
Definition: layout.c:262
M0_INTERNAL int m0_layout_lookup(struct m0_layout_domain *dom, uint64_t lid, struct m0_layout_type *lt, struct m0_db_tx *tx, struct m0_db_pair *pair, struct m0_layout **out)
Definition: layout_db.c:428
static struct m0_stob_domain * dom
Definition: storage.c:38
static struct m0_clink l[NR]
Definition: chan.c:37
Definition: xcode.c:1194
M0_INTERNAL void m0_layout_pair_set(struct m0_db_pair *pair, uint64_t *lid, void *area, m0_bcount_t num_bytes)
Definition: layout_db.c:370
#define out(...)
Definition: gen.c:41