6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
#ifndef _LINUX_DM_IO_H
#define _LINUX_DM_IO_H
#ifdef __KERNEL__
#include <linux/types.h>
struct dm_io_region {
struct block_device *bdev;
sector_t sector;
sector_t count;
};
struct page_list {
struct page_list *next;
struct page *page;
};
typedef void (*io_notify_fn)(unsigned long error, void *context);
enum dm_io_mem_type {
DM_IO_PAGE_LIST,
DM_IO_BIO,
DM_IO_VMA,
DM_IO_KMEM,
};
struct dm_io_memory {
enum dm_io_mem_type type;
unsigned offset;
union {
struct page_list *pl;
struct bio *bio;
void *vma;
void *addr;
} ptr;
};
struct dm_io_notify {
io_notify_fn fn;
void *context;
};
struct dm_io_client;
struct dm_io_request {
int bi_rw;
struct dm_io_memory mem;
struct dm_io_notify notify;
struct dm_io_client *client;
};
struct dm_io_client *dm_io_client_create(void);
void dm_io_client_destroy(struct dm_io_client *client);
int dm_io(struct dm_io_request *io_req, unsigned num_regions,
struct dm_io_region *region, unsigned long *sync_error_bits);
#endif /* __KERNEL__ */
#endif /* _LINUX_DM_IO_H */
|