Motr  M0
kaddb2.c
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2014-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 
30 #define M0_TRACE_SUBSYSTEM M0_TRACE_SUBSYS_ADDB
31 
32 #include "lib/misc.h" /* NULL */
33 #include "lib/assert.h"
34 
35 struct m0_addb2_trace_obj;
36 struct m0_addb2_storage;
39 struct m0_stob;
40 
41 M0_INTERNAL struct m0_addb2_storage *
42 m0_addb2_storage_init(const char *location, uint64_t key, bool mkfs, bool force,
44  void *cookie)
45 {
46  M0_IMPOSSIBLE("Storage init in kernel mode?");
47  return NULL;
48 }
49 
51  struct m0_addb2_trace_obj *obj)
52 {
53  M0_IMPOSSIBLE("Storage submit in kernel mode?");
54  return 0;
55 }
56 
57 M0_INTERNAL void *m0_addb2_storage_cookie(const struct m0_addb2_storage *stor)
58 {
59  M0_IMPOSSIBLE("Storage cookie in kernel mode?");
60  return NULL;
61 }
62 
63 M0_INTERNAL void m0_addb2_storage_fini(struct m0_addb2_storage *stor)
64 {;}
65 
66 M0_INTERNAL void m0_addb2_storage_stop(struct m0_addb2_storage *stor)
67 {;}
68 
69 M0_INTERNAL bool
71 {
72  return true;
73 }
74 
75 #undef M0_TRACE_SUBSYSTEM
76 
79 /*
80  * Local variables:
81  * c-indentation-style: "K&R"
82  * c-basic-offset: 8
83  * tab-width: 8
84  * fill-column: 80
85  * scroll-step: 1
86  * End:
87  */
88 /*
89  * vim: tabstop=8 shiftwidth=8 noexpandtab textwidth=80 nowrap
90  */
static struct m0_addb2_storage * stor
Definition: storage.c:41
#define NULL
Definition: misc.h:38
M0_INTERNAL void * m0_addb2_storage_cookie(const struct m0_addb2_storage *stor)
Definition: kaddb2.c:57
M0_INTERNAL void m0_addb2_storage_stop(struct m0_addb2_storage *stor)
Definition: kaddb2.c:66
uint64_t m0_bcount_t
Definition: types.h:77
M0_INTERNAL bool m0_addb2_storage__is_not_locked(const struct m0_addb2_storage *stor)
Definition: kaddb2.c:70
static struct foo * obj
Definition: tlist.c:302
const char * location
Definition: storage.c:50
M0_INTERNAL void m0_addb2_storage_fini(struct m0_addb2_storage *stor)
Definition: kaddb2.c:63
Definition: stob.h:163
M0_INTERNAL struct m0_addb2_storage * m0_addb2_storage_init(const char *location, uint64_t key, bool mkfs, bool force, const struct m0_addb2_storage_ops *ops, m0_bcount_t size, void *cookie)
Definition: kaddb2.c:42
M0_INTERNAL int m0_addb2_storage_submit(struct m0_addb2_storage *stor, struct m0_addb2_trace_obj *obj)
Definition: kaddb2.c:50
m0_bcount_t size
Definition: di.c:39
struct m0_fom_ops ops
Definition: io_foms.c:623
Definition: idx_mock.c:47
#define M0_IMPOSSIBLE(fmt,...)