1*ef740c37SChristoph Hellwig #ifndef _RAID0_H 2*ef740c37SChristoph Hellwig #define _RAID0_H 3*ef740c37SChristoph Hellwig 4*ef740c37SChristoph Hellwig #include <linux/raid/md.h> 5*ef740c37SChristoph Hellwig 6*ef740c37SChristoph Hellwig struct strip_zone 7*ef740c37SChristoph Hellwig { 8*ef740c37SChristoph Hellwig sector_t zone_start; /* Zone offset in md_dev (in sectors) */ 9*ef740c37SChristoph Hellwig sector_t dev_start; /* Zone offset in real dev (in sectors) */ 10*ef740c37SChristoph Hellwig sector_t sectors; /* Zone size in sectors */ 11*ef740c37SChristoph Hellwig int nb_dev; /* # of devices attached to the zone */ 12*ef740c37SChristoph Hellwig mdk_rdev_t **dev; /* Devices attached to the zone */ 13*ef740c37SChristoph Hellwig }; 14*ef740c37SChristoph Hellwig 15*ef740c37SChristoph Hellwig struct raid0_private_data 16*ef740c37SChristoph Hellwig { 17*ef740c37SChristoph Hellwig struct strip_zone **hash_table; /* Table of indexes into strip_zone */ 18*ef740c37SChristoph Hellwig struct strip_zone *strip_zone; 19*ef740c37SChristoph Hellwig mdk_rdev_t **devlist; /* lists of rdevs, pointed to by strip_zone->dev */ 20*ef740c37SChristoph Hellwig int nr_strip_zones; 21*ef740c37SChristoph Hellwig 22*ef740c37SChristoph Hellwig sector_t spacing; 23*ef740c37SChristoph Hellwig int sector_shift; /* shift this before divide by spacing */ 24*ef740c37SChristoph Hellwig }; 25*ef740c37SChristoph Hellwig 26*ef740c37SChristoph Hellwig typedef struct raid0_private_data raid0_conf_t; 27*ef740c37SChristoph Hellwig 28*ef740c37SChristoph Hellwig #define mddev_to_conf(mddev) ((raid0_conf_t *) mddev->private) 29*ef740c37SChristoph Hellwig 30*ef740c37SChristoph Hellwig #endif 31