mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
b414579f45
If we treat conf->devlist more like a 2 dimensional array, we can get the devlist for a particular zone simply by indexing that array, so we don't need to store the pointers to subarrays in strip_zone. This makes strip_zone smaller and so (hopefully) searches faster. Signed-of-by: NeilBrown <neilb@suse.de>
23 lines
519 B
C
23 lines
519 B
C
#ifndef _RAID0_H
|
|
#define _RAID0_H
|
|
|
|
struct strip_zone
|
|
{
|
|
sector_t zone_end; /* Start of the next zone (in sectors) */
|
|
sector_t dev_start; /* Zone offset in real dev (in sectors) */
|
|
int nb_dev; /* # of devices attached to the zone */
|
|
};
|
|
|
|
struct raid0_private_data
|
|
{
|
|
struct strip_zone *strip_zone;
|
|
mdk_rdev_t **devlist; /* lists of rdevs, pointed to by strip_zone->dev */
|
|
int nr_strip_zones;
|
|
};
|
|
|
|
typedef struct raid0_private_data raid0_conf_t;
|
|
|
|
#define mddev_to_conf(mddev) ((raid0_conf_t *) mddev->private)
|
|
|
|
#endif
|