Commit ba40ae79 authored by Dmitry Eremin's avatar Dmitry Eremin Committed by Greg Kroah-Hartman

staging: lustre: obdclass: lu_htable_order() return type to long

Change the type accordant usage.
Signed-off-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577
Reviewed-on: http://review.whamcloud.com/12385Reviewed-by: default avatarBob Glossman <bob.glossman@intel.com>
Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 816afc79
......@@ -352,7 +352,7 @@ int lu_site_purge(const struct lu_env *env, struct lu_site *s, int nr)
* the dispose list, removing them from LRU and hash table.
*/
start = s->ls_purge_start;
bnr = (nr == ~0) ? -1 : nr / CFS_HASH_NBKT(s->ls_obj_hash) + 1;
bnr = (nr == ~0) ? -1 : nr / (int)CFS_HASH_NBKT(s->ls_obj_hash) + 1;
again:
/*
* It doesn't make any sense to make purge threads parallel, that can
......@@ -869,11 +869,11 @@ EXPORT_SYMBOL(lu_site_print);
/**
* Return desired hash table order.
*/
static unsigned int lu_htable_order(struct lu_device *top)
static unsigned long lu_htable_order(struct lu_device *top)
{
unsigned long bits_max = LU_SITE_BITS_MAX;
unsigned long cache_size;
unsigned int bits;
unsigned long bits;
/*
* Calculate hash table size, assuming that we want reasonable
......@@ -990,7 +990,7 @@ int lu_site_init(struct lu_site *s, struct lu_device *top)
memset(s, 0, sizeof(*s));
mutex_init(&s->ls_purge_mutex);
snprintf(name, 16, "lu_site_%s", top->ld_type->ldt_name);
snprintf(name, sizeof(name), "lu_site_%s", top->ld_type->ldt_name);
for (bits = lu_htable_order(top); bits >= LU_SITE_BITS_MIN; bits--) {
s->ls_obj_hash = cfs_hash_create(name, bits, bits,
bits - LU_SITE_BKT_BITS,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment