[PATCH] md: tidy up raid5/6 hash table code

- replace open-coded hash chain with hlist macros

- Fix hash-table size at one page - it is already quite generous, so there
  will never be a need to use multiple pages, so no need for __get_free_pages

No functional change.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
NeilBrown 2006-01-06 00:20:33 -08:00 committed by Linus Torvalds
parent 9ffae0cf3e
commit fccddba060
3 changed files with 33 additions and 57 deletions

View file

@ -126,7 +126,7 @@
*/
struct stripe_head {
struct stripe_head *hash_next, **hash_pprev; /* hash pointers */
struct hlist_node hash;
struct list_head lru; /* inactive_list or handle_list */
struct raid5_private_data *raid_conf;
sector_t sector; /* sector of this row */
@ -204,7 +204,7 @@ struct disk_info {
};
struct raid5_private_data {
struct stripe_head **stripe_hashtbl;
struct hlist_head *stripe_hashtbl;
mddev_t *mddev;
struct disk_info *spare;
int chunk_size, level, algorithm;