Motr  M0
elevator.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_ELEVATOR_H__
25 #define __MOTR_DESIM_ELEVATOR_H__
26 
27 #include "desim/sim.h"
28 #include "desim/storage.h"
29 #include "lib/tlist.h"
30 
36 struct elevator {
37  struct storage_dev *e_dev;
38  int e_idle;
39  struct m0_tl e_queue;
40  struct sim_chan e_wait;
41 };
42 
43 M0_INTERNAL void elevator_init(struct elevator *el, struct storage_dev *dev);
44 M0_INTERNAL void elevator_fini(struct elevator *el);
45 
46 M0_INTERNAL void elevator_io(struct elevator *el, enum storage_req_type type,
47  sector_t sector, unsigned long count);
48 
49 #endif /* __MOTR_DESIM_ELEVATOR_H__ */
50 
53 /*
54  * Local variables:
55  * c-indentation-style: "K&R"
56  * c-basic-offset: 8
57  * tab-width: 8
58  * fill-column: 80
59  * scroll-step: 1
60  * End:
61  */
int e_idle
Definition: elevator.h:38
M0_INTERNAL void elevator_init(struct elevator *el, struct storage_dev *dev)
Definition: elevator.c:77
static m0_bcount_t count
Definition: xcode.c:167
unsigned long long sector_t
Definition: storage.h:34
struct sim_chan e_wait
Definition: elevator.h:40
Definition: tlist.h:251
storage_req_type
Definition: storage.h:42
Definition: sim.h:237
M0_INTERNAL void elevator_io(struct elevator *el, enum storage_req_type type, sector_t sector, unsigned long count)
Definition: elevator.c:93
struct storage_dev * e_dev
Definition: elevator.h:37
M0_INTERNAL void elevator_fini(struct elevator *el)
Definition: elevator.c:87
static struct elevator el
Definition: chs_test.c:102
int type
Definition: dir.c:1031
struct m0_tl e_queue
Definition: elevator.h:39