Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _LINEAR_H |
| 2 | #define _LINEAR_H |
| 3 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | struct dev_info { |
| 5 | mdk_rdev_t *rdev; |
Andre Noll | 6283815 | 2008-10-13 11:55:12 +1100 | [diff] [blame] | 6 | sector_t num_sectors; |
| 7 | sector_t start_sector; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | }; |
| 9 | |
| 10 | typedef struct dev_info dev_info_t; |
| 11 | |
| 12 | struct linear_private_data |
| 13 | { |
NeilBrown | 7c7546c | 2006-06-26 00:27:41 -0700 | [diff] [blame] | 14 | struct linear_private_data *prev; /* earlier version */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | dev_info_t **hash_table; |
Andre Noll | ab5bd5c | 2008-10-13 11:55:12 +1100 | [diff] [blame] | 16 | sector_t spacing; |
Andre Noll | d6e2215 | 2008-07-21 17:05:25 +1000 | [diff] [blame] | 17 | sector_t array_sectors; |
Andre Noll | ab5bd5c | 2008-10-13 11:55:12 +1100 | [diff] [blame] | 18 | int sector_shift; /* shift before dividing |
| 19 | * by spacing |
| 20 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | dev_info_t disks[0]; |
| 22 | }; |
| 23 | |
| 24 | |
| 25 | typedef struct linear_private_data linear_conf_t; |
| 26 | |
| 27 | #define mddev_to_conf(mddev) ((linear_conf_t *) mddev->private) |
| 28 | |
| 29 | #endif |