Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _RAID0_H |
| 2 | #define _RAID0_H |
| 3 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | struct strip_zone |
| 5 | { |
Andre Noll | 6199d3d | 2009-01-09 08:31:07 +1100 | [diff] [blame] | 6 | sector_t zone_start; /* Zone offset in md_dev (in sectors) */ |
Andre Noll | 019c4e2 | 2009-01-09 08:31:06 +1100 | [diff] [blame] | 7 | sector_t dev_start; /* Zone offset in real dev (in sectors) */ |
Andre Noll | 83838ed | 2009-01-09 08:31:07 +1100 | [diff] [blame] | 8 | sector_t sectors; /* Zone size in sectors */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | int nb_dev; /* # of devices attached to the zone */ |
| 10 | mdk_rdev_t **dev; /* Devices attached to the zone */ |
| 11 | }; |
| 12 | |
| 13 | struct raid0_private_data |
| 14 | { |
| 15 | struct strip_zone **hash_table; /* Table of indexes into strip_zone */ |
| 16 | struct strip_zone *strip_zone; |
| 17 | mdk_rdev_t **devlist; /* lists of rdevs, pointed to by strip_zone->dev */ |
| 18 | int nr_strip_zones; |
| 19 | |
Andre Noll | ccacc7d | 2009-01-09 08:31:08 +1100 | [diff] [blame] | 20 | sector_t spacing; |
| 21 | int sector_shift; /* shift this before divide by spacing */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | }; |
| 23 | |
| 24 | typedef struct raid0_private_data raid0_conf_t; |
| 25 | |
| 26 | #define mddev_to_conf(mddev) ((raid0_conf_t *) mddev->private) |
| 27 | |
| 28 | #endif |