md: Removal of hash table in linear raid
Get rid of sector_div and hash table for linear raid and replace with a linear search in which_dev. The hash table adds a lot of complexity for little if any gain. Ultimately a binary search will be used which will have smaller cache foot print, a similar number of memory access, and no divisions. Signed-off-by: Sandeep K Sinha <sandeepksinha@gmail.com> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
committed by
NeilBrown
parent
070ec55d07
commit
45d4582f21
@@ -12,12 +12,7 @@ typedef struct dev_info dev_info_t;
|
||||
struct linear_private_data
|
||||
{
|
||||
struct linear_private_data *prev; /* earlier version */
|
||||
dev_info_t **hash_table;
|
||||
sector_t spacing;
|
||||
sector_t array_sectors;
|
||||
int sector_shift; /* shift before dividing
|
||||
* by spacing
|
||||
*/
|
||||
dev_info_t disks[0];
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user