Motr
M0
storage.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_STORAGE_H__
25
#define __MOTR_DESIM_STORAGE_H__
26
27
#include "
desim/sim.h
"
28
34
typedef
unsigned
long
long
sector_t
;
35
36
struct
storage_dev
;
37
38
struct
storage_conf
{
39
unsigned
sc_sector_size
;
40
};
41
42
enum
storage_req_type
{
43
SRT_READ
,
44
SRT_WRITE
45
};
46
47
typedef
void (*
storage_end_io_t
)(
struct
storage_dev
*dev);
48
typedef
void (*
storage_submit_t
)(
struct
storage_dev
*dev,
49
enum
storage_req_type
type
,
50
sector_t
sector,
unsigned
long
count
);
51
52
struct
elevator
;
53
struct
storage_dev
{
54
struct
sim
*
sd_sim
;
55
struct
storage_conf
*
sd_conf
;
56
storage_end_io_t
sd_end_io
;
57
storage_submit_t
sd_submit
;
58
struct
elevator
*
sd_el
;
59
char
*
sd_name
;
60
};
61
62
#endif
/* __MOTR_DESIM_STORAGE_H__ */
63
66
/*
67
* Local variables:
68
* c-indentation-style: "K&R"
69
* c-basic-offset: 8
70
* tab-width: 8
71
* fill-column: 80
72
* scroll-step: 1
73
* End:
74
*/
sim
Definition:
sim.h:152
storage_conf::sc_sector_size
unsigned sc_sector_size
Definition:
storage.h:39
storage_submit_t
void(* storage_submit_t)(struct storage_dev *dev, enum storage_req_type type, sector_t sector, unsigned long count)
Definition:
storage.h:48
storage_dev
Definition:
storage.h:53
count
static m0_bcount_t count
Definition:
xcode.c:167
sector_t
unsigned long long sector_t
Definition:
storage.h:34
storage_dev::sd_name
char * sd_name
Definition:
storage.h:59
elevator
Definition:
elevator.h:36
storage_req_type
storage_req_type
Definition:
storage.h:42
storage_dev::sd_sim
struct sim * sd_sim
Definition:
storage.h:54
SRT_WRITE
Definition:
storage.h:44
storage_dev::sd_end_io
storage_end_io_t sd_end_io
Definition:
storage.h:56
storage_conf
Definition:
storage.h:38
storage_dev::sd_el
struct elevator * sd_el
Definition:
storage.h:58
SRT_READ
Definition:
storage.h:43
type
int type
Definition:
dir.c:1031
storage_dev::sd_conf
struct storage_conf * sd_conf
Definition:
storage.h:55
sim.h
storage_end_io_t
void(* storage_end_io_t)(struct storage_dev *dev)
Definition:
storage.h:47
storage_dev::sd_submit
storage_submit_t sd_submit
Definition:
storage.h:57
desim
storage.h
Generated on Thu Apr 14 2022 14:02:51 for Motr by
1.8.14