1
2
3
4
5
6
7
8
9
10
11
12#ifndef _LINUX_DM_KCOPYD_H
13#define _LINUX_DM_KCOPYD_H
14
15#ifdef __KERNEL__
16
17#include <linux/dm-io.h>
18
19
20#define DM_KCOPYD_MAX_REGIONS 8
21
22#define DM_KCOPYD_IGNORE_ERROR 1
23
24
25
26
27struct dm_kcopyd_client;
28struct dm_kcopyd_client *dm_kcopyd_client_create(void);
29void dm_kcopyd_client_destroy(struct dm_kcopyd_client *kc);
30
31
32
33
34
35
36
37
38typedef void (*dm_kcopyd_notify_fn)(int read_err, unsigned long write_err,
39 void *context);
40
41int dm_kcopyd_copy(struct dm_kcopyd_client *kc, struct dm_io_region *from,
42 unsigned num_dests, struct dm_io_region *dests,
43 unsigned flags, dm_kcopyd_notify_fn fn, void *context);
44
45
46
47
48
49
50
51
52
53
54
55
56void *dm_kcopyd_prepare_callback(struct dm_kcopyd_client *kc,
57 dm_kcopyd_notify_fn fn, void *context);
58void dm_kcopyd_do_callback(void *job, int read_err, unsigned long write_err);
59
60int dm_kcopyd_zero(struct dm_kcopyd_client *kc,
61 unsigned num_dests, struct dm_io_region *dests,
62 unsigned flags, dm_kcopyd_notify_fn fn, void *context);
63
64#endif
65#endif
66