diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-03-18 05:01:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-18 12:46:40 -0400 |
commit | c2e213cff701fce71a0aba8de82f2c2a4acf52ae (patch) | |
tree | 5b26d130b31b9a8acea6fca416021c08731d6e81 /include/linux/rhashtable.h | |
parent | 6aebd940840a4d3a0a8ffc5883d3892f4bd61e90 (diff) |
rhashtable: Introduce max_size/min_size
This patch adds the parameters max_size and min_size which are
meant to replace max_shift and min_shift.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/rhashtable.h')
-rw-r--r-- | include/linux/rhashtable.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index f16e85692959..81267fef85d7 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h | |||
@@ -85,6 +85,8 @@ struct rhashtable; | |||
85 | * @head_offset: Offset of rhash_head in struct to be hashed | 85 | * @head_offset: Offset of rhash_head in struct to be hashed |
86 | * @max_shift: Maximum number of shifts while expanding | 86 | * @max_shift: Maximum number of shifts while expanding |
87 | * @min_shift: Minimum number of shifts while shrinking | 87 | * @min_shift: Minimum number of shifts while shrinking |
88 | * @max_size: Maximum size while expanding | ||
89 | * @min_size: Minimum size while shrinking | ||
88 | * @nulls_base: Base value to generate nulls marker | 90 | * @nulls_base: Base value to generate nulls marker |
89 | * @locks_mul: Number of bucket locks to allocate per cpu (default: 128) | 91 | * @locks_mul: Number of bucket locks to allocate per cpu (default: 128) |
90 | * @hashfn: Function to hash key | 92 | * @hashfn: Function to hash key |
@@ -97,6 +99,8 @@ struct rhashtable_params { | |||
97 | size_t head_offset; | 99 | size_t head_offset; |
98 | size_t max_shift; | 100 | size_t max_shift; |
99 | size_t min_shift; | 101 | size_t min_shift; |
102 | unsigned int max_size; | ||
103 | unsigned int min_size; | ||
100 | u32 nulls_base; | 104 | u32 nulls_base; |
101 | size_t locks_mul; | 105 | size_t locks_mul; |
102 | rht_hashfn_t hashfn; | 106 | rht_hashfn_t hashfn; |