aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/multipath.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/multipath.h')
-rw-r--r--drivers/md/multipath.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/md/multipath.h b/drivers/md/multipath.h
new file mode 100644
index 000000000000..6fa70b400cda
--- /dev/null
+++ b/drivers/md/multipath.h
@@ -0,0 +1,40 @@
1#ifndef _MULTIPATH_H
2#define _MULTIPATH_H
3
4struct multipath_info {
5 mdk_rdev_t *rdev;
6};
7
8struct multipath_private_data {
9 mddev_t *mddev;
10 struct multipath_info *multipaths;
11 int raid_disks;
12 int working_disks;
13 spinlock_t device_lock;
14 struct list_head retry_list;
15
16 mempool_t *pool;
17};
18
19typedef struct multipath_private_data multipath_conf_t;
20
21/*
22 * this is the only point in the RAID code where we violate
23 * C type safety. mddev->private is an 'opaque' pointer.
24 */
25#define mddev_to_conf(mddev) ((multipath_conf_t *) mddev->private)
26
27/*
28 * this is our 'private' 'collective' MULTIPATH buffer head.
29 * it contains information about what kind of IO operations were started
30 * for this MULTIPATH operation, and about their status:
31 */
32
33struct multipath_bh {
34 mddev_t *mddev;
35 struct bio *master_bio;
36 struct bio bio;
37 int path;
38 struct list_head retry_list;
39};
40#endif