Gitweb: http://git.kernel.org/linus/8f79cfcdb65472f1504ade2f53e5f2bfdaeb95da
Commit: 8f79cfcdb65472f1504ade2f53e5f2bfdaeb95da
Parent: 09770e0b6ee649313611a2d6a9b44f456072dbd6
Author: Andre Noll <maan@systemlinux.org>
AuthorDate: Tue Jun 16 16:47:10 2009 +1000
Committer: NeilBrown <neilb@suse.de>
CommitDate: Tue Jun 16 16:47:10 2009 +1000
md: raid0: Remove hash spacing and sector shift.
The "sector_shift" and "spacing" fields of struct raid0_private_data
were only used for the hash table lookups. So the removal of the
hash table allows get rid of these fields as well which simplifies
create_strip_zones() and raid0_run() quite a bit.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
---
drivers/md/raid0.c | 63 +---------------------------------------------------
drivers/md/raid0.h | 3 --
2 files changed, 1 insertions(+), 65 deletions(-)
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index d4c9c5d..edffc49 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -56,7 +56,6 @@ static int create_strip_zones (mddev_t *mddev)
{
int i, c, j;
sector_t curr_zone_end;
- sector_t min_spacing;
raid0_conf_t *conf = mddev_to_conf(mddev);
mdk_rdev_t *smallest, *rdev1, *rdev2, *rdev;
struct strip_zone *zone;
@@ -202,28 +201,7 @@ static int create_strip_zones (mddev_t *mddev)
printk(KERN_INFO "raid0: current zone start: %llu\n",
(unsigned long long)smallest->sectors);
}
- /* Now find appropriate hash spacing.
- * We want a number which causes most hash entries to cover
- * at most two strips, but the hash table must be at most
- * 1 PAGE. We choose the smallest strip, or contiguous collection
- * of strips, that has big enough size. We never consider the last
- * strip though as it's size has no bearing on the efficacy of the hash
- * table.
- */
- conf->spacing = curr_zone_end;
- min_spacing = curr_zone_end;
- sector_div(min_spacing, ...