summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2005-01-07 22:00:48 -0800
committerLinus Torvalds <torvalds@evo.osdl.org>2005-01-07 22:00:48 -0800
commit23526361e625a61e4020c4994da522c5f900584d (patch)
treee053697ea462c93ae4ddec93a8c5b74c686bcaeb /include/linux
parente975169bcfca519ad2b280fbfdd12bbef11ee6b7 (diff)
[PATCH] md: improve 'hash' code in linear.c
The hashtable that linear uses to find the right device stores two pointers for every entry. The second is always one of: The first plus 1 NULL When NULL, it is never accessed, so any value can be stored. Thus it could always be "first plus 1", and so we don't need to store it as it is trivial to calculate. This patch halves the size of this table, which results in some simpler code as well. 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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/raid/linear.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/include/linux/raid/linear.h b/include/linux/raid/linear.h
index e951b2bb9cdf..e04c4fe45b53 100644
--- a/include/linux/raid/linear.h
+++ b/include/linux/raid/linear.h
@@ -11,14 +11,9 @@ struct dev_info {
typedef struct dev_info dev_info_t;
-struct linear_hash
-{
- dev_info_t *dev0, *dev1;
-};
-
struct linear_private_data
{
- struct linear_hash *hash_table;
+ dev_info_t **hash_table;
dev_info_t *smallest;
int nr_zones;
dev_info_t disks[0];