summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-03-18 20:01:16 +1100
committerDavid S. Miller <davem@davemloft.net>2015-03-18 12:46:40 -0400
commitc2e213cff701fce71a0aba8de82f2c2a4acf52ae (patch)
tree5b26d130b31b9a8acea6fca416021c08731d6e81 /include
parent6aebd940840a4d3a0a8ffc5883d3892f4bd61e90 (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')
-rw-r--r--include/linux/rhashtable.h4
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;
* @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;