blob: bf8179587f950b2ace4eba54a73abaf4960463ab [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _LINEAR_H
2#define _LINEAR_H
3
Linus Torvalds1da177e2005-04-16 15:20:36 -07004struct dev_info {
5 mdk_rdev_t *rdev;
Andre Noll62838152008-10-13 11:55:12 +11006 sector_t num_sectors;
7 sector_t start_sector;
Linus Torvalds1da177e2005-04-16 15:20:36 -07008};
9
10typedef struct dev_info dev_info_t;
11
12struct linear_private_data
13{
NeilBrown7c7546c2006-06-26 00:27:41 -070014 struct linear_private_data *prev; /* earlier version */
Linus Torvalds1da177e2005-04-16 15:20:36 -070015 dev_info_t **hash_table;
Andre Nollab5bd5c2008-10-13 11:55:12 +110016 sector_t spacing;
Andre Nolld6e22152008-07-21 17:05:25 +100017 sector_t array_sectors;
Andre Nollab5bd5c2008-10-13 11:55:12 +110018 int sector_shift; /* shift before dividing
19 * by spacing
20 */
Linus Torvalds1da177e2005-04-16 15:20:36 -070021 dev_info_t disks[0];
22};
23
24
25typedef struct linear_private_data linear_conf_t;
26
27#define mddev_to_conf(mddev) ((linear_conf_t *) mddev->private)
28
29#endif