15945fee6f
linear currently uses division by the size of the smallest componenet device to find which device a request goes to. If that smallest device is larger than 2 terabytes, then the division will not work on some systems. So we introduce a pre-shift, and take care not to make the hash table too large, much like the code in raid0. Also get rid of conf->nr_zones, which is not needed. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
27 lines
470 B
C
27 lines
470 B
C
#ifndef _LINEAR_H
|
|
#define _LINEAR_H
|
|
|
|
#include <linux/raid/md.h>
|
|
|
|
struct dev_info {
|
|
mdk_rdev_t *rdev;
|
|
sector_t size;
|
|
sector_t offset;
|
|
};
|
|
|
|
typedef struct dev_info dev_info_t;
|
|
|
|
struct linear_private_data
|
|
{
|
|
dev_info_t **hash_table;
|
|
sector_t hash_spacing;
|
|
int preshift; /* shift before dividing by hash_spacing */
|
|
dev_info_t disks[0];
|
|
};
|
|
|
|
|
|
typedef struct linear_private_data linear_conf_t;
|
|
|
|
#define mddev_to_conf(mddev) ((linear_conf_t *) mddev->private)
|
|
|
|
#endif
|