Home
last modified time | relevance | path

Searched refs:bucket (Results 1 – 25 of 85) sorted by relevance

1234

/linux-3.4.99/net/ceph/crush/
Dmapper.c68 static int bucket_perm_choose(struct crush_bucket *bucket, in bucket_perm_choose() argument
71 unsigned pr = r % bucket->size; in bucket_perm_choose()
75 if (bucket->perm_x != (__u32)x || bucket->perm_n == 0) { in bucket_perm_choose()
76 dprintk("bucket %d new x=%d\n", bucket->id, x); in bucket_perm_choose()
77 bucket->perm_x = x; in bucket_perm_choose()
81 s = crush_hash32_3(bucket->hash, x, bucket->id, 0) % in bucket_perm_choose()
82 bucket->size; in bucket_perm_choose()
83 bucket->perm[0] = s; in bucket_perm_choose()
84 bucket->perm_n = 0xffff; /* magic value, see below */ in bucket_perm_choose()
88 for (i = 0; i < bucket->size; i++) in bucket_perm_choose()
[all …]
/linux-3.4.99/fs/dlm/
Ddir.c132 uint32_t bucket; in add_entry_to_hash() local
134 bucket = dir_hash(ls, de->name, de->length); in add_entry_to_hash()
135 list_add_tail(&de->list, &ls->ls_dirtbl[bucket].list); in add_entry_to_hash()
139 int namelen, uint32_t bucket) in search_bucket() argument
143 list_for_each_entry(de, &ls->ls_dirtbl[bucket].list, list) { in search_bucket()
155 uint32_t bucket; in dlm_dir_remove_entry() local
157 bucket = dir_hash(ls, name, namelen); in dlm_dir_remove_entry()
159 spin_lock(&ls->ls_dirtbl[bucket].lock); in dlm_dir_remove_entry()
161 de = search_bucket(ls, name, namelen, bucket); in dlm_dir_remove_entry()
176 spin_unlock(&ls->ls_dirtbl[bucket].lock); in dlm_dir_remove_entry()
[all …]
Ddebug_fs.c349 unsigned bucket; member
401 unsigned bucket, entry; in table_seq_start() local
403 bucket = n >> 32; in table_seq_start()
406 if (bucket >= ls->ls_rsbtbl_size) in table_seq_start()
421 spin_lock(&ls->ls_rsbtbl[bucket].lock); in table_seq_start()
422 if (!RB_EMPTY_ROOT(&ls->ls_rsbtbl[bucket].keep)) { in table_seq_start()
423 for (node = rb_first(&ls->ls_rsbtbl[bucket].keep); node; in table_seq_start()
429 ri->bucket = bucket; in table_seq_start()
430 spin_unlock(&ls->ls_rsbtbl[bucket].lock); in table_seq_start()
435 spin_unlock(&ls->ls_rsbtbl[bucket].lock); in table_seq_start()
[all …]
/linux-3.4.99/drivers/cpuidle/governors/
Dmenu.c119 unsigned int bucket; member
139 int bucket = 0; in which_bucket() local
148 bucket = BUCKETS/2; in which_bucket()
151 return bucket; in which_bucket()
153 return bucket + 1; in which_bucket()
155 return bucket + 2; in which_bucket()
157 return bucket + 3; in which_bucket()
159 return bucket + 4; in which_bucket()
160 return bucket + 5; in which_bucket()
262 data->bucket = which_bucket(data->expected_us); in menu_select()
[all …]
/linux-3.4.99/net/9p/
Derror.c196 int bucket; in p9_error_init() local
199 for (bucket = 0; bucket < ERRHASHSZ; bucket++) in p9_error_init()
200 INIT_HLIST_HEAD(&hash_errmap[bucket]); in p9_error_init()
205 bucket = jhash(c->name, c->namelen, 0) % ERRHASHSZ; in p9_error_init()
207 hlist_add_head(&c->list, &hash_errmap[bucket]); in p9_error_init()
226 int bucket; in p9_errstr2errno() local
231 bucket = jhash(errstr, len, 0) % ERRHASHSZ; in p9_errstr2errno()
232 hlist_for_each_entry(c, p, &hash_errmap[bucket], list) { in p9_errstr2errno()
/linux-3.4.99/lib/
Ddma-debug.c237 static void put_hash_bucket(struct hash_bucket *bucket, in put_hash_bucket() argument
242 spin_unlock_irqrestore(&bucket->lock, __flags); in put_hash_bucket()
267 static struct dma_debug_entry *__hash_bucket_find(struct hash_bucket *bucket, in __hash_bucket_find() argument
274 list_for_each_entry(entry, &bucket->list, list) { in __hash_bucket_find()
317 static struct dma_debug_entry *bucket_find_exact(struct hash_bucket *bucket, in bucket_find_exact() argument
320 return __hash_bucket_find(bucket, ref, exact_match); in bucket_find_exact()
323 static struct dma_debug_entry *bucket_find_contain(struct hash_bucket **bucket, in bucket_find_contain() argument
333 entry = __hash_bucket_find(*bucket, &index, containing_match); in bucket_find_contain()
341 put_hash_bucket(*bucket, flags); in bucket_find_contain()
344 *bucket = get_hash_bucket(&index, flags); in bucket_find_contain()
[all …]
/linux-3.4.99/net/ipv4/netfilter/
Dnf_conntrack_l3proto_ipv4_compat.c28 unsigned int bucket; member
37 for (st->bucket = 0; in ct_get_first()
38 st->bucket < net->ct.htable_size; in ct_get_first()
39 st->bucket++) { in ct_get_first()
41 hlist_nulls_first_rcu(&net->ct.hash[st->bucket])); in ct_get_first()
56 if (likely(get_nulls_value(head) == st->bucket)) { in ct_get_next()
57 if (++st->bucket >= net->ct.htable_size) in ct_get_next()
61 hlist_nulls_first_rcu(&net->ct.hash[st->bucket])); in ct_get_next()
214 unsigned int bucket; member
223 for (st->bucket = 0; st->bucket < nf_ct_expect_hsize; st->bucket++) { in ct_expect_get_first()
[all …]
/linux-3.4.99/fs/ocfs2/
Dxattr.c135 struct ocfs2_xattr_bucket *bucket; member
289 struct ocfs2_xattr_bucket *bucket,
311 struct ocfs2_xattr_bucket *bucket,
332 struct ocfs2_xattr_bucket *bucket; in ocfs2_xattr_bucket_new() local
337 bucket = kzalloc(sizeof(struct ocfs2_xattr_bucket), GFP_NOFS); in ocfs2_xattr_bucket_new()
338 if (bucket) { in ocfs2_xattr_bucket_new()
339 bucket->bu_inode = inode; in ocfs2_xattr_bucket_new()
340 bucket->bu_blocks = blks; in ocfs2_xattr_bucket_new()
343 return bucket; in ocfs2_xattr_bucket_new()
346 static void ocfs2_xattr_bucket_relse(struct ocfs2_xattr_bucket *bucket) in ocfs2_xattr_bucket_relse() argument
[all …]
/linux-3.4.99/fs/
Dmbcache.c390 unsigned int bucket; in mb_cache_entry_insert() local
394 bucket = hash_long((unsigned long)bdev + (block & 0xffffffff), in mb_cache_entry_insert()
397 list_for_each_prev(l, &cache->c_block_hash[bucket]) { in mb_cache_entry_insert()
406 list_add(&ce->e_block_list, &cache->c_block_hash[bucket]); in mb_cache_entry_insert()
408 bucket = hash_long(key, cache->c_bucket_bits); in mb_cache_entry_insert()
409 list_add(&ce->e_index.o_list, &cache->c_index_hash[bucket]); in mb_cache_entry_insert()
460 unsigned int bucket; in mb_cache_entry_get() local
464 bucket = hash_long((unsigned long)bdev + (block & 0xffffffff), in mb_cache_entry_get()
467 list_for_each(l, &cache->c_block_hash[bucket]) { in mb_cache_entry_get()
559 unsigned int bucket = hash_long(key, cache->c_bucket_bits); in mb_cache_entry_find_first() local
[all …]
/linux-3.4.99/drivers/md/persistent-data/
Ddm-transaction-manager.c48 unsigned bucket = dm_hash_block(b, HASH_MASK); in is_shadow() local
53 hlist_for_each_entry(si, n, tm->buckets + bucket, hlist) in is_shadow()
69 unsigned bucket; in insert_shadow() local
75 bucket = dm_hash_block(b, HASH_MASK); in insert_shadow()
77 hlist_add_head(&si->hlist, tm->buckets + bucket); in insert_shadow()
86 struct hlist_head *bucket; in wipe_shadow_table() local
91 bucket = tm->buckets + i; in wipe_shadow_table()
92 hlist_for_each_entry_safe(si, n, tmp, bucket, hlist) in wipe_shadow_table()
95 INIT_HLIST_HEAD(bucket); in wipe_shadow_table()
/linux-3.4.99/arch/sparc/kernel/
Dirq_64.c505 struct ino_bucket *bucket; in build_irq() local
513 bucket = &ivector_table[ino]; in build_irq()
514 irq = bucket_get_irq(__pa(bucket)); in build_irq()
517 bucket_set_irq(__pa(bucket), irq); in build_irq()
543 struct ino_bucket *bucket; in sun4v_build_common() local
549 bucket = &ivector_table[sysino]; in sun4v_build_common()
550 irq = bucket_get_irq(__pa(bucket)); in sun4v_build_common()
553 bucket_set_irq(__pa(bucket), irq); in sun4v_build_common()
591 struct ino_bucket *bucket; in sun4v_build_virq() local
594 bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC); in sun4v_build_virq()
[all …]
/linux-3.4.99/net/netfilter/
Dxt_hashlimit.c639 unsigned int *bucket; in dl_seq_start() local
645 bucket = kmalloc(sizeof(unsigned int), GFP_ATOMIC); in dl_seq_start()
646 if (!bucket) in dl_seq_start()
649 *bucket = *pos; in dl_seq_start()
650 return bucket; in dl_seq_start()
656 unsigned int *bucket = (unsigned int *)v; in dl_seq_next() local
658 *pos = ++(*bucket); in dl_seq_next()
663 return bucket; in dl_seq_next()
670 unsigned int *bucket = (unsigned int *)v; in dl_seq_stop() local
672 if (!IS_ERR(bucket)) in dl_seq_stop()
[all …]
Dnf_conntrack_standalone.c49 unsigned int bucket; member
59 for (st->bucket = 0; in ct_get_first()
60 st->bucket < net->ct.htable_size; in ct_get_first()
61 st->bucket++) { in ct_get_first()
62 n = rcu_dereference(hlist_nulls_first_rcu(&net->ct.hash[st->bucket])); in ct_get_first()
77 if (likely(get_nulls_value(head) == st->bucket)) { in ct_get_next()
78 if (++st->bucket >= net->ct.htable_size) in ct_get_next()
83 &net->ct.hash[st->bucket])); in ct_get_next()
Dxt_recent.c412 unsigned int bucket; member
425 for (st->bucket = 0; st->bucket < ip_list_hash_size; st->bucket++) in recent_seq_start()
426 list_for_each_entry(e, &t->iphash[st->bucket], list) in recent_seq_start()
439 while (head == &t->iphash[st->bucket]) { in recent_seq_next()
440 if (++st->bucket >= ip_list_hash_size) in recent_seq_next()
442 head = t->iphash[st->bucket].next; in recent_seq_next()
Dnf_conntrack_expect.c444 unsigned int bucket; member
453 for (st->bucket = 0; st->bucket < nf_ct_expect_hsize; st->bucket++) { in ct_expect_get_first()
454 n = rcu_dereference(hlist_first_rcu(&net->ct.expect_hash[st->bucket])); in ct_expect_get_first()
469 if (++st->bucket >= nf_ct_expect_hsize) in ct_expect_get_next()
471 head = rcu_dereference(hlist_first_rcu(&net->ct.expect_hash[st->bucket])); in ct_expect_get_next()
/linux-3.4.99/net/atm/
Dproc.c69 int bucket; member
79 static int __vcc_walk(struct sock **sock, int family, int *bucket, loff_t l) in __vcc_walk() argument
84 for (*bucket = 0; *bucket < VCC_HTABLE_SIZE; ++*bucket) { in __vcc_walk()
85 struct hlist_head *head = &vcc_hash[*bucket]; in __vcc_walk()
99 if (!sk && ++*bucket < VCC_HTABLE_SIZE) { in __vcc_walk()
100 sk = sk_head(&vcc_hash[*bucket]); in __vcc_walk()
111 return __vcc_walk(&state->sk, state->family, &state->bucket, l) ? in vcc_walk()
/linux-3.4.99/net/netfilter/ipvs/
Dip_vs_lblc.c105 struct list_head bucket[IP_VS_LBLC_TAB_SIZE]; /* hash bucket */ member
168 list_add(&en->list, &tbl->bucket[hash]); in ip_vs_lblc_hash()
184 list_for_each_entry(en, &tbl->bucket[hash], list) in ip_vs_lblc_get()
235 list_for_each_entry_safe(en, nxt, &tbl->bucket[i], list) { in ip_vs_lblc_flush()
263 list_for_each_entry_safe(en, nxt, &tbl->bucket[j], list) { in ip_vs_lblc_full_check()
318 list_for_each_entry_safe(en, nxt, &tbl->bucket[j], list) { in ip_vs_lblc_check_expire()
357 INIT_LIST_HEAD(&tbl->bucket[i]); in ip_vs_lblc_init_svc()
Dip_vs_lblcr.c277 struct list_head bucket[IP_VS_LBLCR_TAB_SIZE]; /* hash bucket */ member
337 list_add(&en->list, &tbl->bucket[hash]); in ip_vs_lblcr_hash()
353 list_for_each_entry(en, &tbl->bucket[hash], list) in ip_vs_lblcr_get()
407 list_for_each_entry_safe(en, nxt, &tbl->bucket[i], list) { in ip_vs_lblcr_flush()
434 list_for_each_entry_safe(en, nxt, &tbl->bucket[j], list) { in ip_vs_lblcr_full_check()
488 list_for_each_entry_safe(en, nxt, &tbl->bucket[j], list) { in ip_vs_lblcr_check_expire()
526 INIT_LIST_HEAD(&tbl->bucket[i]); in ip_vs_lblcr_init_svc()
/linux-3.4.99/security/keys/
Dkeyring.c46 unsigned bucket = 0; in keyring_hash() local
49 bucket += (unsigned char)*desc; in keyring_hash()
51 return bucket & (KEYRING_NAME_HASH_SIZE - 1); in keyring_hash()
92 int bucket; in keyring_publish_name() local
95 bucket = keyring_hash(keyring->description); in keyring_publish_name()
99 if (!keyring_name_hash[bucket].next) in keyring_publish_name()
100 INIT_LIST_HEAD(&keyring_name_hash[bucket]); in keyring_publish_name()
103 &keyring_name_hash[bucket]); in keyring_publish_name()
570 int bucket; in find_keyring_by_name() local
575 bucket = keyring_hash(name); in find_keyring_by_name()
[all …]
/linux-3.4.99/net/mac80211/
Dmesh_pathtbl.c344 struct hlist_head *bucket; in mpath_lookup() local
347 bucket = &tbl->hash_buckets[mesh_table_hash(dst, sdata, tbl)]; in mpath_lookup()
348 hlist_for_each_entry_rcu(node, n, bucket, list) { in mpath_lookup()
514 struct hlist_head *bucket; in mesh_path_add() local
554 bucket = &tbl->hash_buckets[hash_idx]; in mesh_path_add()
559 hlist_for_each_entry(node, n, bucket, list) { in mesh_path_add()
566 hlist_add_head_rcu(&new_node->list, bucket); in mesh_path_add()
647 struct hlist_head *bucket; in mpp_path_add() local
683 bucket = &tbl->hash_buckets[hash_idx]; in mpp_path_add()
688 hlist_for_each_entry(node, n, bucket, list) { in mpp_path_add()
[all …]
/linux-3.4.99/arch/hexagon/kernel/
Dptrace.c93 unsigned long bucket; in genregs_set() local
123 INEXT(&bucket, cause); in genregs_set()
124 INEXT(&bucket, badva); in genregs_set()
/linux-3.4.99/net/ipv4/
Dtcp_ipv4.c2023 ilb = &tcp_hashinfo.listening_hash[st->bucket]; in listening_get_next()
2029 ilb = &tcp_hashinfo.listening_hash[st->bucket]; in listening_get_next()
2084 if (++st->bucket < INET_LHTABLE_SIZE) { in listening_get_next()
2085 ilb = &tcp_hashinfo.listening_hash[st->bucket]; in listening_get_next()
2100 st->bucket = 0; in listening_get_idx()
2113 return hlist_nulls_empty(&tcp_hashinfo.ehash[st->bucket].chain) && in empty_bucket()
2114 hlist_nulls_empty(&tcp_hashinfo.ehash[st->bucket].twchain); in empty_bucket()
2128 for (; st->bucket <= tcp_hashinfo.ehash_mask; ++st->bucket) { in established_get_first()
2132 spinlock_t *lock = inet_ehash_lockp(&tcp_hashinfo, st->bucket); in established_get_first()
2139 sk_nulls_for_each(sk, node, &tcp_hashinfo.ehash[st->bucket].chain) { in established_get_first()
[all …]
Dping.c759 for (state->bucket = start; state->bucket < PING_HTABLE_SIZE; in ping_get_first()
760 ++state->bucket) { in ping_get_first()
764 hslot = &ping_table.hash[state->bucket]; in ping_get_first()
789 return ping_get_first(seq, state->bucket + 1); in ping_get_next()
806 state->bucket = 0; in ping_seq_start()
832 int bucket, int *len) in ping_format_sock() argument
842 bucket, src, srcp, dest, destp, sp->sk_state, in ping_format_sock()
861 ping_format_sock(v, seq, state->bucket, &len); in ping_seq_show()
/linux-3.4.99/Documentation/vDSO/
Dparse_vdso.c64 Elf64_Word *bucket, *chain; member
164 vdso_info.bucket = &hash[2]; in vdso_init_from_sysinfo_ehdr()
216 Elf64_Word chain = vdso_info.bucket[elf_hash(name) % vdso_info.nbucket]; in vdso_sym()
/linux-3.4.99/net/llc/
Dllc_proc.c67 static struct sock *laddr_hash_next(struct llc_sap *sap, int bucket) in laddr_hash_next() argument
72 while (++bucket < LLC_SK_LADDR_HASH_ENTRIES) in laddr_hash_next()
73 sk_nulls_for_each(sk, node, &sap->sk_laddr_hash[bucket]) in laddr_hash_next()

1234