md: raid0: Remove hash table.

Previous thread: md: raid0: remove ->sectors from the strip_zone structure. by Linux Kernel Mailing List on Thursday, June 18, 2009 - 3:01 pm. (1 message)

Next thread: md: raid0: Allocate all buffers for the raid0 configuration in one function. by Linux Kernel Mailing List on Thursday, June 18, 2009 - 3:01 pm. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, June 18, 2009 - 3:01 pm

Gitweb:     http://git.kernel.org/linus/09770e0b6ee649313611a2d6a9b44f456072dbd6
Commit:     09770e0b6ee649313611a2d6a9b44f456072dbd6
Parent:     d27a43abd7be0ab4b2337e4587feca8c7340e5f9
Author:     Andre Noll <maan@systemlinux.org>
AuthorDate: Tue Jun 16 16:46:48 2009 +1000
Committer:  NeilBrown <neilb@suse.de>
CommitDate: Tue Jun 16 16:46:48 2009 +1000

    md: raid0: Remove hash table.
    
    The raid0 hash table has become unused due to the changes in the
    previous patch. This patch removes the hash table allocation and
    setup code and kills the hash_table field of struct raid0_private_data.
    
    Signed-off-by: Andre Noll <maan@systemlinux.org>
    Signed-off-by: NeilBrown <neilb@suse.de>
---
 drivers/md/raid0.c |   12 ------------
 drivers/md/raid0.h |    1 -
 2 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 1afdfd1..d4c9c5d 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -326,22 +326,14 @@ static int raid0_run (mddev_t *mddev)
 		nb_zone = s + round;
 	}
 	printk(KERN_INFO "raid0 : nb_zone is %d.\n", nb_zone);
-
-	printk(KERN_INFO "raid0 : Allocating %zu bytes for hash.\n",
-				nb_zone*sizeof(struct strip_zone*));
-	conf->hash_table = kmalloc (sizeof (struct strip_zone *)*nb_zone, GFP_KERNEL);
-	if (!conf->hash_table)
-		goto out_free_conf;
 	sectors = conf->strip_zone[cur].sectors;
 
-	conf->hash_table[0] = conf->strip_zone + cur;
 	for (i=1; i< nb_zone; i++) {
 		while (sectors <= conf->spacing) {
 			cur++;
 			sectors += conf->strip_zone[cur].sectors;
 		}
 		sectors -= conf->spacing;
-		conf->hash_table[i] = conf->strip_zone + cur;
 	}
 	if (conf->sector_shift) {
 		conf->spacing >>= conf->sector_shift;
@@ -384,8 +376,6 @@ static int raid0_stop (mddev_t *mddev)
 	raid0_conf_t *conf = mddev_to_conf(mddev);
 
 	blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
-	kfree(conf->hash_table);
-	conf->hash_table = NULL;
 	kfree(conf->strip_zone);
 ...
Previous thread: md: raid0: remove ->sectors from the strip_zone structure. by Linux Kernel Mailing List on Thursday, June 18, 2009 - 3:01 pm. (1 message)

Next thread: md: raid0: Allocate all buffers for the raid0 configuration in one function. by Linux Kernel Mailing List on Thursday, June 18, 2009 - 3:01 pm. (1 message)