4 #include <linux/raid/md.h>
6 typedef struct mirror_info mirror_info_t;
10 sector_t head_position;
13 typedef struct r1bio_s r1bio_t;
15 struct r1_private_data_s {
17 mirror_info_t *mirrors;
21 sector_t next_seq_sect;
22 spinlock_t device_lock;
24 /* for use when syncing mirrors: */
26 spinlock_t resync_lock;
31 wait_queue_head_t wait_idle;
32 wait_queue_head_t wait_resume;
34 mempool_t *r1bio_pool;
35 mempool_t *r1buf_pool;
38 typedef struct r1_private_data_s conf_t;
41 * this is the only point in the RAID code where we violate
42 * C type safety. mddev->private is an 'opaque' pointer.
44 #define mddev_to_conf(mddev) ((conf_t *) mddev->private)
47 * this is our 'private' RAID1 bio.
49 * it contains information about what kind of IO operations were started
50 * for this RAID1 operation, and about their status:
54 atomic_t remaining; /* 'have we finished' count,
55 * used from IRQ handlers
62 * original bio going to /dev/mdx
64 struct bio *master_bio;
66 * if the IO is in READ direction, then this is where we read
70 struct list_head retry_list;
72 * if the IO is in WRITE direction, then multiple bios are used.
73 * We choose the number when they are allocated.
78 /* bits for r1bio.state */
79 #define R1BIO_Uptodate 0
80 #define R1BIO_IsSync 1