/fs/ext4/ |
D | hash.c | 40 __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9; in dx_hack_hash_unsigned() local 44 hash = hash1 + (hash0 ^ (((int) *ucp++) * 7152373)); in dx_hack_hash_unsigned() 46 if (hash & 0x80000000) in dx_hack_hash_unsigned() 47 hash -= 0x7fffffff; in dx_hack_hash_unsigned() 49 hash0 = hash; in dx_hack_hash_unsigned() 56 __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9; in dx_hack_hash_signed() local 60 hash = hash1 + (hash0 ^ (((int) *scp++) * 7152373)); in dx_hack_hash_signed() 62 if (hash & 0x80000000) in dx_hack_hash_signed() 63 hash -= 0x7fffffff; in dx_hack_hash_signed() 65 hash0 = hash; in dx_hack_hash_signed() [all …]
|
D | dir.c | 259 __u32 hash; member 334 int ext4_htree_store_dirent(struct file *dir_file, __u32 hash, in ext4_htree_store_dirent() argument 351 new_fn->hash = hash; in ext4_htree_store_dirent() 367 if ((new_fn->hash == fname->hash) && in ext4_htree_store_dirent() 374 if (new_fn->hash < fname->hash) in ext4_htree_store_dirent() 376 else if (new_fn->hash > fname->hash) in ext4_htree_store_dirent() 412 curr_pos = hash2pos(fname->hash, fname->minor_hash); in call_filldir() 491 info->curr_hash = fname->hash; in ext4_dx_readdir() 500 info->curr_hash = fname->hash; in ext4_dx_readdir()
|
D | namei.c | 99 __le32 hash; member 143 u32 hash; member 171 u32 hash, ext4_lblk_t block); 172 static int ext4_htree_next_block(struct inode *dir, __u32 hash, 210 return le32_to_cpu(entry->hash); in dx_get_hash() 215 entry->hash = cpu_to_le32(value); in dx_set_hash() 291 printk(":%x.%u ", h.hash, in dx_show_leaf() 315 ext4_lblk_t hash = i ? dx_get_hash(entries): 0; in dx_show_entries() local 316 u32 range = i < count - 1? (dx_get_hash(entries + 1) - hash): ~hash; in dx_show_entries() 318 printk("%s%3u:%03u hash %8x/%8x ",levels?"":" ", i, block, hash, range); in dx_show_entries() [all …]
|
D | xattr.c | 1397 __u32 hash = le32_to_cpu(BHDR(bh)->h_hash); in ext4_xattr_cache_insert() local 1406 error = mb_cache_entry_insert(ce, bh->b_bdev, bh->b_blocknr, &hash); in ext4_xattr_cache_insert() 1414 ea_bdebug(bh, "inserting [%x]", (int)hash); in ext4_xattr_cache_insert() 1471 __u32 hash = le32_to_cpu(header->h_hash); in ext4_xattr_cache_find() local 1476 ea_idebug(inode, "looking for cached blocks [%x]", (int)hash); in ext4_xattr_cache_find() 1479 inode->i_sb->s_bdev, hash); in ext4_xattr_cache_find() 1504 ce = mb_cache_entry_find_next(ce, 0, inode->i_sb->s_bdev, hash); in ext4_xattr_cache_find() 1520 __u32 hash = 0; in ext4_xattr_hash_entry() local 1525 hash = (hash << NAME_HASH_SHIFT) ^ in ext4_xattr_hash_entry() 1526 (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^ in ext4_xattr_hash_entry() [all …]
|
/fs/ext3/ |
D | hash.c | 40 __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9; in dx_hack_hash_unsigned() local 44 hash = hash1 + (hash0 ^ (((int) *ucp++) * 7152373)); in dx_hack_hash_unsigned() 46 if (hash & 0x80000000) in dx_hack_hash_unsigned() 47 hash -= 0x7fffffff; in dx_hack_hash_unsigned() 49 hash0 = hash; in dx_hack_hash_unsigned() 56 __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9; in dx_hack_hash_signed() local 60 hash = hash1 + (hash0 ^ (((int) *scp++) * 7152373)); in dx_hack_hash_signed() 62 if (hash & 0x80000000) in dx_hack_hash_signed() 63 hash -= 0x7fffffff; in dx_hack_hash_signed() 65 hash0 = hash; in dx_hack_hash_signed() [all …]
|
D | dir.c | 257 __u32 hash; member 332 int ext3_htree_store_dirent(struct file *dir_file, __u32 hash, in ext3_htree_store_dirent() argument 349 new_fn->hash = hash; in ext3_htree_store_dirent() 365 if ((new_fn->hash == fname->hash) && in ext3_htree_store_dirent() 372 if (new_fn->hash < fname->hash) in ext3_htree_store_dirent() 374 else if (new_fn->hash > fname->hash) in ext3_htree_store_dirent() 409 curr_pos = hash2pos(fname->hash, fname->minor_hash); in call_filldir() 488 info->curr_hash = fname->hash; in ext3_dx_readdir() 497 info->curr_hash = fname->hash; in ext3_dx_readdir()
|
D | xattr.c | 1130 __u32 hash = le32_to_cpu(BHDR(bh)->h_hash); in ext3_xattr_cache_insert() local 1139 error = mb_cache_entry_insert(ce, bh->b_bdev, bh->b_blocknr, &hash); in ext3_xattr_cache_insert() 1147 ea_bdebug(bh, "inserting [%x]", (int)hash); in ext3_xattr_cache_insert() 1204 __u32 hash = le32_to_cpu(header->h_hash); in ext3_xattr_cache_find() local 1209 ea_idebug(inode, "looking for cached blocks [%x]", (int)hash); in ext3_xattr_cache_find() 1212 inode->i_sb->s_bdev, hash); in ext3_xattr_cache_find() 1237 ce = mb_cache_entry_find_next(ce, 0, inode->i_sb->s_bdev, hash); in ext3_xattr_cache_find() 1253 __u32 hash = 0; in ext3_xattr_hash_entry() local 1258 hash = (hash << NAME_HASH_SHIFT) ^ in ext3_xattr_hash_entry() 1259 (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^ in ext3_xattr_hash_entry() [all …]
|
D | namei.c | 99 __le32 hash; member 143 u32 hash; member 170 static void dx_insert_block (struct dx_frame *frame, u32 hash, u32 block); 171 static int ext3_htree_next_block(struct inode *dir, __u32 hash, 208 return le32_to_cpu(entry->hash); in dx_get_hash() 213 entry->hash = cpu_to_le32(value); in dx_set_hash() 289 printk(":%x.%u ", h.hash, in dx_show_leaf() 312 u32 block = dx_get_block(entries), hash = i? dx_get_hash(entries): 0; in dx_show_entries() local 313 u32 range = i < count - 1? (dx_get_hash(entries + 1) - hash): ~hash; in dx_show_entries() 315 printk("%s%3u:%03u hash %8x/%8x ",levels?"":" ", i, block, hash, range); in dx_show_entries() [all …]
|
/fs/ubifs/ |
D | key.h | 48 static inline uint32_t key_mask_hash(uint32_t hash) in key_mask_hash() argument 50 hash &= UBIFS_S_KEY_HASH_MASK; in key_mask_hash() 51 if (unlikely(hash <= 2)) in key_mask_hash() 52 hash += 3; in key_mask_hash() 53 return hash; in key_mask_hash() 156 uint32_t hash = c->key_hash(nm->name, nm->len); in dent_key_init() local 158 ubifs_assert(!(hash & ~UBIFS_S_KEY_HASH_MASK)); in dent_key_init() 160 key->u32[1] = hash | (UBIFS_DENT_KEY << UBIFS_S_KEY_HASH_BITS); in dent_key_init() 173 uint32_t hash) in dent_key_init_hash() argument 175 ubifs_assert(!(hash & ~UBIFS_S_KEY_HASH_MASK)); in dent_key_init_hash() [all …]
|
/fs/hfs/ |
D | string.c | 57 unsigned int hash, len = this->len; in hfs_hash_dentry() local 62 hash = init_name_hash(); in hfs_hash_dentry() 64 hash = partial_name_hash(caseorder[*name++], hash); in hfs_hash_dentry() 65 this->hash = end_name_hash(hash); in hfs_hash_dentry()
|
/fs/hpfs/ |
D | dentry.c | 17 unsigned long hash; in hpfs_hash_dentry() local 29 hash = init_name_hash(); in hpfs_hash_dentry() 31 hash = partial_name_hash(hpfs_upcase(hpfs_sb(dentry->d_sb)->sb_cp_table,qstr->name[i]), hash); in hpfs_hash_dentry() 32 qstr->hash = end_name_hash(hash); in hpfs_hash_dentry()
|
/fs/coda/ |
D | cnode.c | 63 unsigned long hash = coda_f2i(fid); in coda_iget() local 65 inode = iget5_locked(sb, hash, coda_test_inode, coda_set_inode, fid); in coda_iget() 73 inode->i_ino = hash; in coda_iget() 114 unsigned long hash = coda_f2i(newfid); in coda_replace_fid() local 124 inode->i_ino = hash; in coda_replace_fid() 125 __insert_inode_hash(inode, hash); in coda_replace_fid() 132 unsigned long hash = coda_f2i(fid); in coda_fid_to_inode() local 139 inode = ilookup5(sb, hash, coda_test_inode, fid); in coda_fid_to_inode()
|
/fs/jbd2/ |
D | revoke.c | 82 struct list_head hash; member 109 static inline int hash(journal_t *journal, unsigned long long block) in hash() function 113 int hash = (int)block ^ (int)((block >> 31) >> 1); in hash() local 115 return ((hash << (hash_shift - 6)) ^ in hash() 116 (hash >> 13) ^ in hash() 117 (hash << (hash_shift - 12))) & (table->hash_size - 1); in hash() 133 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash() 135 list_add(&record->hash, hash_list); in insert_revoke_hash() 155 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record() 159 while (&(record->hash) != hash_list) { in find_revoke_record() [all …]
|
/fs/ext2/ |
D | xattr.c | 829 __u32 hash = le32_to_cpu(HDR(bh)->h_hash); in ext2_xattr_cache_insert() local 836 error = mb_cache_entry_insert(ce, bh->b_bdev, bh->b_blocknr, &hash); in ext2_xattr_cache_insert() 845 ea_bdebug(bh, "inserting [%x] (%d cache entries)", (int)hash, in ext2_xattr_cache_insert() 903 __u32 hash = le32_to_cpu(header->h_hash); in ext2_xattr_cache_find() local 908 ea_idebug(inode, "looking for cached blocks [%x]", (int)hash); in ext2_xattr_cache_find() 911 inode->i_sb->s_bdev, hash); in ext2_xattr_cache_find() 943 ce = mb_cache_entry_find_next(ce, 0, inode->i_sb->s_bdev, hash); in ext2_xattr_cache_find() 959 __u32 hash = 0; in ext2_xattr_hash_entry() local 964 hash = (hash << NAME_HASH_SHIFT) ^ in ext2_xattr_hash_entry() 965 (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^ in ext2_xattr_hash_entry() [all …]
|
/fs/nfsd/ |
D | export.c | 275 int hash = item->ek_fsidtype; in svc_expkey_lookup() local 279 hash ^= hash_mem(cp, len, EXPKEY_HASHBITS); in svc_expkey_lookup() 280 hash ^= hash_ptr(item->ek_client, EXPKEY_HASHBITS); in svc_expkey_lookup() 281 hash &= EXPKEY_HASHMASK; in svc_expkey_lookup() 284 hash); in svc_expkey_lookup() 295 int hash = new->ek_fsidtype; in svc_expkey_update() local 299 hash ^= hash_mem(cp, len, EXPKEY_HASHBITS); in svc_expkey_update() 300 hash ^= hash_ptr(new->ek_client, EXPKEY_HASHBITS); in svc_expkey_update() 301 hash &= EXPKEY_HASHMASK; in svc_expkey_update() 304 &old->h, hash); in svc_expkey_update() [all …]
|
/fs/affs/ |
D | namei.c | 64 unsigned long hash; in __affs_hash_dentry() local 71 hash = init_name_hash(); in __affs_hash_dentry() 74 hash = partial_name_hash(toupper(*name), hash); in __affs_hash_dentry() 75 qstr->hash = end_name_hash(hash); in __affs_hash_dentry() 161 int hash; in affs_hash_name() local 163 hash = len = min(len, 30u); in affs_hash_name() 165 hash = (hash * 13 + toupper(*name++)) & 0x7ff; in affs_hash_name() 167 return hash % AFFS_SB(sb)->s_hashsize; in affs_hash_name()
|
/fs/autofs/ |
D | dirhash.c | 115 DPRINTK(("autofs_hash_lookup: hash = 0x%08x, name = ", name->hash)); in autofs_hash_lookup() 118 for ( dhn = dh->h[(unsigned) name->hash % AUTOFS_HASH_SIZE] ; dhn ; dhn = dhn->next ) { in autofs_hash_lookup() 119 if ( name->hash == dhn->hash && in autofs_hash_lookup() 132 DPRINTK(("autofs_hash_insert: hash = 0x%08x, name = ", ent->hash)); in autofs_hash_insert() 139 dhnp = &dh->h[(unsigned) ent->hash % AUTOFS_HASH_SIZE]; in autofs_hash_insert() 207 printk("autofs_hash_enum: found hash %08x, name", ent->hash); in autofs_hash_enum()
|
/fs/gfs2/ |
D | glock.c | 50 int hash; /* hash bucket index */ member 237 static struct gfs2_glock *search_bucket(unsigned int hash, in search_bucket() argument 244 hlist_for_each_entry(gl, h, &gl_hash_table[hash].hb_list, gl_list) { in search_bucket() 269 unsigned int hash = gl_hash(sdp, name); in gfs2_glock_find() local 272 read_lock(gl_lock_addr(hash)); in gfs2_glock_find() 273 gl = search_bucket(hash, sdp, name); in gfs2_glock_find() 274 read_unlock(gl_lock_addr(hash)); in gfs2_glock_find() 715 unsigned int hash = gl_hash(sdp, &name); in gfs2_glock_get() local 718 read_lock(gl_lock_addr(hash)); in gfs2_glock_get() 719 gl = search_bucket(hash, sdp, &name); in gfs2_glock_get() [all …]
|
D | recovery.c | 156 u32 hash; in get_log_header() local 163 hash = crc32_le((u32)~0, bh->b_data, sizeof(struct gfs2_log_header) - in get_log_header() 165 hash = crc32_le(hash, (unsigned char const *)¬hing, sizeof(nothing)); in get_log_header() 166 hash ^= (u32)~0; in get_log_header() 170 if (error || lh.lh_blkno != blk || lh.lh_hash != hash) in get_log_header() 387 u32 hash; in clean_journal() local 418 hash = gfs2_disk_hash((const char *)lh, sizeof(struct gfs2_log_header)); in clean_journal() 419 lh->lh_hash = cpu_to_be32(hash); in clean_journal()
|
/fs/jbd/ |
D | revoke.c | 82 struct list_head hash; member 109 static inline int hash(journal_t *journal, unsigned long block) in hash() function 132 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash() 134 list_add(&record->hash, hash_list); in insert_revoke_hash() 154 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record() 158 while (&(record->hash) != hash_list) { in find_revoke_record() 163 record = (struct jbd_revoke_record_s *) record->hash.next; in find_revoke_record() 435 list_del(&record->hash); in journal_cancel_revoke() 515 list_del(&record->hash); in journal_write_revoke_records() 686 list_del(&record->hash); in journal_clear_revoke()
|
/fs/adfs/ |
D | dir.c | 210 unsigned long hash; in adfs_hash() local 222 hash = init_name_hash(); in adfs_hash() 230 hash = partial_name_hash(c, hash); in adfs_hash() 232 qstr->hash = end_name_hash(hash); in adfs_hash()
|
/fs/hfsplus/ |
D | unicode.c | 329 unsigned long hash; in hfsplus_hash_dentry() local 335 hash = init_name_hash(); in hfsplus_hash_dentry() 348 hash = partial_name_hash(c2, hash); in hfsplus_hash_dentry() 353 hash = partial_name_hash(c2, hash); in hfsplus_hash_dentry() 356 str->hash = end_name_hash(hash); in hfsplus_hash_dentry()
|
/fs/ |
D | dcache.c | 937 dentry->d_name.hash = name->hash; in d_alloc() 977 q.hash = full_name_hash(q.name, q.len); in d_alloc_name() 1036 unsigned int hash = entry->d_name.hash; in __d_instantiate_unique() local 1046 if (qstr->hash != hash) in __d_instantiate_unique() 1111 unsigned long hash) in d_hash() argument 1113 hash += ((unsigned long) parent ^ GOLDEN_RATIO_PRIME) / L1_CACHE_BYTES; in d_hash() 1114 hash = hash ^ ((hash ^ GOLDEN_RATIO_PRIME) >> D_HASHBITS); in d_hash() 1115 return dentry_hashtable + (hash & D_HASHMASK); in d_hash() 1374 unsigned int hash = name->hash; in __d_lookup() local 1376 struct hlist_head *head = d_hash(parent,hash); in __d_lookup() [all …]
|
/fs/lockd/ |
D | host.c | 53 unsigned int hash = (__force u32)n ^ ((__force u32)n >> 16); in __nlm_hash32() local 54 return hash ^ (hash >> 8); in __nlm_hash32() 75 unsigned int hash; in nlm_hash_address() local 79 hash = __nlm_hash_addr4(sap); in nlm_hash_address() 82 hash = __nlm_hash_addr6(sap); in nlm_hash_address() 85 hash = 0; in nlm_hash_address() 87 return hash & (NLM_HOST_NRHASH - 1); in nlm_hash_address()
|
/fs/xfs/linux-2.6/ |
D | xfs_buf.c | 499 xfs_bufhash_t *hash; in _xfs_buf_find() local 509 hash = &btp->bt_hash[hash_long((unsigned long)ioff, btp->bt_hashshift)]; in _xfs_buf_find() 511 spin_lock(&hash->bh_lock); in _xfs_buf_find() 513 list_for_each_entry_safe(bp, n, &hash->bh_list, b_hash_list) { in _xfs_buf_find() 522 list_move(&bp->b_hash_list, &hash->bh_list); in _xfs_buf_find() 531 new_bp->b_hash = hash; in _xfs_buf_find() 532 list_add(&new_bp->b_hash_list, &hash->bh_list); in _xfs_buf_find() 537 spin_unlock(&hash->bh_lock); in _xfs_buf_find() 541 spin_unlock(&hash->bh_lock); in _xfs_buf_find() 859 xfs_bufhash_t *hash = bp->b_hash; in xfs_buf_rele() local [all …]
|