Motr  M0
m0t1fs.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2020 Seagate Technology LLC and/or its Affiliates
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  * For any questions about this software or licensing,
17  * please email opensource@seagate.com or cortx-questions@seagate.com.
18  *
19  */
20 
21 
22 #pragma once
23 
24 #ifndef __MOTR_DESIM_M0T1FS_H__
25 #define __MOTR_DESIM_M0T1FS_H__
26 
32 #include "lib/tlist.h"
33 #include "lib/types.h" /* m0_bcount_t */
34 
35 #include "pool/pool.h"
36 #include "layout/layout.h"
37 #include "layout/pdclust.h"
38 
39 struct net_conf;
40 struct net_srv;
41 struct m0t1fs_thread;
42 struct m0t1fs_client;
43 
44 struct m0t1fs_thread {
47  unsigned cth_id;
49 };
50 
51 struct m0t1fs_client {
53  unsigned cc_id;
54  struct m0t1fs_conn {
55  unsigned cs_inflight;
57  } *cc_srv;
59 };
60 
61 struct m0t1fs_conf {
62  unsigned ct_nr_clients;
63  unsigned ct_nr_threads;
64  unsigned ct_nr_servers;
65  unsigned ct_nr_devices;
68  struct m0_pool ct_pool;
70  uint32_t ct_N;
71  uint32_t ct_K;
72  uint32_t ct_S;
73  uint64_t ct_unitsize;
74  unsigned long ct_client_step;
75  unsigned long ct_thread_step;
76  unsigned ct_inflight_max;
80  struct net_conf *ct_net;
81  struct net_srv *ct_srv0;
82  struct net_srv *ct_srv;
84 };
85 
86 M0_INTERNAL void m0t1fs_init(struct sim *s, struct m0t1fs_conf *conf);
87 M0_INTERNAL void m0t1fs_fini(struct m0t1fs_conf *conf);
88 
89 #endif /* __MOTR_DESIM_M0T1FS_H__ */
90 
93 /*
94  * Local variables:
95  * c-indentation-style: "K&R"
96  * c-basic-offset: 8
97  * tab-width: 8
98  * fill-column: 80
99  * scroll-step: 1
100  * End:
101  */
unsigned long ct_client_step
Definition: m0t1fs.h:74
sim_time_t ct_delay_min
Definition: m0t1fs.h:78
unsigned ct_nr_devices
Definition: m0t1fs.h:65
struct m0_layout_domain ct_l_dom
Definition: m0t1fs.h:66
Definition: sim.h:152
unsigned ct_nr_clients
Definition: m0t1fs.h:62
uint32_t ct_K
Definition: m0t1fs.h:71
unsigned ct_nr_servers
Definition: m0t1fs.h:64
Definition: net.h:57
struct m0t1fs_client * cth_client
Definition: m0t1fs.h:46
Definition: conf.py:1
uint64_t m0_bcount_t
Definition: types.h:77
unsigned ct_nr_threads
Definition: m0t1fs.h:63
unsigned cth_id
Definition: m0t1fs.h:47
unsigned long ct_thread_step
Definition: m0t1fs.h:75
Definition: net.h:39
struct net_conf * ct_net
Definition: m0t1fs.h:80
struct m0_pdclust_layout * ct_pdclust
Definition: m0t1fs.h:67
unsigned ct_inflight_max
Definition: m0t1fs.h:76
struct m0_pool_version ct_pool_version
Definition: m0t1fs.h:69
M0_INTERNAL void m0t1fs_fini(struct m0t1fs_conf *conf)
Definition: m0t1fs.c:237
uint32_t ct_N
Definition: m0t1fs.h:70
M0_INTERNAL void m0t1fs_init(struct sim *s, struct m0t1fs_conf *conf)
Definition: m0t1fs.c:173
struct m0t1fs_conf * cc_conf
Definition: m0t1fs.h:58
unsigned cc_id
Definition: m0t1fs.h:53
m0_bcount_t ct_total
Definition: m0t1fs.h:77
unsigned long long sim_time_t
Definition: sim.h:111
Definition: sim.h:237
struct m0_layout_instance * cth_layout_instance
Definition: m0t1fs.h:48
struct m0t1fs_client * ct_client
Definition: m0t1fs.h:83
struct m0t1fs_client::m0t1fs_conn * cc_srv
struct m0t1fs_thread * cc_thread
Definition: m0t1fs.h:52
sim_time_t ct_delay_max
Definition: m0t1fs.h:79
uint32_t ct_S
Definition: m0t1fs.h:72
Definition: pool.h:80
struct net_srv * ct_srv
Definition: m0t1fs.h:82
struct m0_pool ct_pool
Definition: m0t1fs.h:68
uint64_t ct_unitsize
Definition: m0t1fs.h:73
static struct m0_addb2_source * s
Definition: consumer.c:39
struct sim_chan cs_wakeup
Definition: m0t1fs.h:56
struct sim_thread cth_thread
Definition: m0t1fs.h:45
struct net_srv * ct_srv0
Definition: m0t1fs.h:81