diff options
Diffstat (limited to 'drivers/md/dm-hw-handler.h')
-rw-r--r-- | drivers/md/dm-hw-handler.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/drivers/md/dm-hw-handler.h b/drivers/md/dm-hw-handler.h deleted file mode 100644 index 46809dcb121a..000000000000 --- a/drivers/md/dm-hw-handler.h +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004 Red Hat, Inc. All rights reserved. | ||
3 | * | ||
4 | * This file is released under the GPL. | ||
5 | * | ||
6 | * Multipath hardware handler registration. | ||
7 | */ | ||
8 | |||
9 | #ifndef DM_HW_HANDLER_H | ||
10 | #define DM_HW_HANDLER_H | ||
11 | |||
12 | #include <linux/device-mapper.h> | ||
13 | |||
14 | #include "dm-mpath.h" | ||
15 | |||
16 | struct hw_handler_type; | ||
17 | struct hw_handler { | ||
18 | struct hw_handler_type *type; | ||
19 | struct mapped_device *md; | ||
20 | void *context; | ||
21 | }; | ||
22 | |||
23 | /* | ||
24 | * Constructs a hardware handler object, takes custom arguments | ||
25 | */ | ||
26 | /* Information about a hardware handler type */ | ||
27 | struct hw_handler_type { | ||
28 | char *name; | ||
29 | struct module *module; | ||
30 | |||
31 | int (*create) (struct hw_handler *handler, unsigned int argc, | ||
32 | char **argv); | ||
33 | void (*destroy) (struct hw_handler *hwh); | ||
34 | |||
35 | void (*pg_init) (struct hw_handler *hwh, unsigned bypassed, | ||
36 | struct dm_path *path); | ||
37 | unsigned (*error) (struct hw_handler *hwh, struct bio *bio); | ||
38 | int (*status) (struct hw_handler *hwh, status_type_t type, | ||
39 | char *result, unsigned int maxlen); | ||
40 | }; | ||
41 | |||
42 | /* Register a hardware handler */ | ||
43 | int dm_register_hw_handler(struct hw_handler_type *type); | ||
44 | |||
45 | /* Unregister a hardware handler */ | ||
46 | int dm_unregister_hw_handler(struct hw_handler_type *type); | ||
47 | |||
48 | /* Returns a registered hardware handler type */ | ||
49 | struct hw_handler_type *dm_get_hw_handler(const char *name); | ||
50 | |||
51 | /* Releases a hardware handler */ | ||
52 | void dm_put_hw_handler(struct hw_handler_type *hwht); | ||
53 | |||
54 | /* Default err function */ | ||
55 | unsigned dm_scsi_err_handler(struct hw_handler *hwh, struct bio *bio); | ||
56 | |||
57 | /* Error flags for err and dm_pg_init_complete */ | ||
58 | #define MP_FAIL_PATH 1 | ||
59 | #define MP_BYPASS_PG 2 | ||
60 | #define MP_ERROR_IO 4 /* Don't retry this I/O */ | ||
61 | #define MP_RETRY 8 | ||
62 | |||
63 | #endif | ||