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>
This commit is contained in:
Herbert Xu 2015-03-18 20:01:16 +11:00 committed by David S. Miller
parent 6aebd94084
commit c2e213cff7
2 changed files with 12 additions and 4 deletions

View file

@ -85,6 +85,8 @@ struct rhashtable;
* @head_offset: Offset of rhash_head in struct to be hashed
* @max_shift: Maximum number of shifts while expanding
* @min_shift: Minimum number of shifts while shrinking
* @max_size: Maximum size while expanding
* @min_size: Minimum size while shrinking
* @nulls_base: Base value to generate nulls marker
* @locks_mul: Number of bucket locks to allocate per cpu (default: 128)
* @hashfn: Function to hash key
@ -97,6 +99,8 @@ struct rhashtable_params {
size_t head_offset;
size_t max_shift;
size_t min_shift;
unsigned int max_size;
unsigned int min_size;
u32 nulls_base;
size_t locks_mul;
rht_hashfn_t hashfn;