/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 | 390 __u32 hash; member 466 int ext4_htree_store_dirent(struct file *dir_file, __u32 hash, in ext4_htree_store_dirent() argument 483 new_fn->hash = hash; in ext4_htree_store_dirent() 499 if ((new_fn->hash == fname->hash) && in ext4_htree_store_dirent() 506 if (new_fn->hash < fname->hash) in ext4_htree_store_dirent() 508 else if (new_fn->hash > fname->hash) in ext4_htree_store_dirent() 545 curr_pos = hash2pos(filp, fname->hash, fname->minor_hash); in call_filldir() 624 info->curr_hash = fname->hash; in ext4_dx_readdir() 633 info->curr_hash = fname->hash; in ext4_dx_readdir()
|
D | xattr.c | 1417 __u32 hash = le32_to_cpu(BHDR(bh)->h_hash); in ext4_xattr_cache_insert() local 1426 error = mb_cache_entry_insert(ce, bh->b_bdev, bh->b_blocknr, hash); in ext4_xattr_cache_insert() 1434 ea_bdebug(bh, "inserting [%x]", (int)hash); in ext4_xattr_cache_insert() 1491 __u32 hash = le32_to_cpu(header->h_hash); in ext4_xattr_cache_find() local 1496 ea_idebug(inode, "looking for cached blocks [%x]", (int)hash); in ext4_xattr_cache_find() 1499 hash); in ext4_xattr_cache_find() 1523 ce = mb_cache_entry_find_next(ce, inode->i_sb->s_bdev, hash); in ext4_xattr_cache_find() 1539 __u32 hash = 0; in ext4_xattr_hash_entry() local 1544 hash = (hash << NAME_HASH_SHIFT) ^ in ext4_xattr_hash_entry() 1545 (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^ in ext4_xattr_hash_entry() [all …]
|
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 …]
|
/fs/ext3/ |
D | hash.c | 38 __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9; in dx_hack_hash_unsigned() local 42 hash = hash1 + (hash0 ^ (((int) *ucp++) * 7152373)); in dx_hack_hash_unsigned() 44 if (hash & 0x80000000) in dx_hack_hash_unsigned() 45 hash -= 0x7fffffff; in dx_hack_hash_unsigned() 47 hash0 = hash; in dx_hack_hash_unsigned() 54 __u32 hash, hash0 = 0x12a3fe2d, hash1 = 0x37abe8f9; in dx_hack_hash_signed() local 58 hash = hash1 + (hash0 ^ (((int) *scp++) * 7152373)); in dx_hack_hash_signed() 60 if (hash & 0x80000000) in dx_hack_hash_signed() 61 hash -= 0x7fffffff; in dx_hack_hash_signed() 63 hash0 = hash; in dx_hack_hash_signed() [all …]
|
D | dir.c | 252 __u32 hash; member 327 int ext3_htree_store_dirent(struct file *dir_file, __u32 hash, in ext3_htree_store_dirent() argument 344 new_fn->hash = hash; in ext3_htree_store_dirent() 360 if ((new_fn->hash == fname->hash) && in ext3_htree_store_dirent() 367 if (new_fn->hash < fname->hash) in ext3_htree_store_dirent() 369 else if (new_fn->hash > fname->hash) in ext3_htree_store_dirent() 404 curr_pos = hash2pos(fname->hash, fname->minor_hash); in call_filldir() 483 info->curr_hash = fname->hash; in ext3_dx_readdir() 492 info->curr_hash = fname->hash; in ext3_dx_readdir()
|
D | xattr.c | 1136 __u32 hash = le32_to_cpu(BHDR(bh)->h_hash); in ext3_xattr_cache_insert() local 1145 error = mb_cache_entry_insert(ce, bh->b_bdev, bh->b_blocknr, hash); in ext3_xattr_cache_insert() 1153 ea_bdebug(bh, "inserting [%x]", (int)hash); in ext3_xattr_cache_insert() 1210 __u32 hash = le32_to_cpu(header->h_hash); in ext3_xattr_cache_find() local 1215 ea_idebug(inode, "looking for cached blocks [%x]", (int)hash); in ext3_xattr_cache_find() 1218 hash); in ext3_xattr_cache_find() 1243 ce = mb_cache_entry_find_next(ce, inode->i_sb->s_bdev, hash); in ext3_xattr_cache_find() 1259 __u32 hash = 0; in ext3_xattr_hash_entry() local 1264 hash = (hash << NAME_HASH_SHIFT) ^ in ext3_xattr_hash_entry() 1265 (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^ in ext3_xattr_hash_entry() [all …]
|
D | namei.c | 88 __le32 hash; member 132 u32 hash; member 159 static void dx_insert_block (struct dx_frame *frame, u32 hash, u32 block); 160 static int ext3_htree_next_block(struct inode *dir, __u32 hash, 197 return le32_to_cpu(entry->hash); in dx_get_hash() 202 entry->hash = cpu_to_le32(value); in dx_set_hash() 278 printk(":%x.%u ", h.hash, in dx_show_leaf() 301 u32 block = dx_get_block(entries), hash = i? dx_get_hash(entries): 0; in dx_show_entries() local 302 u32 range = i < count - 1? (dx_get_hash(entries + 1) - hash): ~hash; in dx_show_entries() 304 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/nfs/ |
D | pnfs_dev.c | 75 long hash) in _lookup_deviceid() argument 80 hlist_for_each_entry_rcu(d, n, &nfs4_deviceid_cache[hash], node) in _lookup_deviceid() 100 long hash) in _find_get_deviceid() argument 105 d = _lookup_deviceid(ld, clp, id, hash); in _find_get_deviceid() 183 long hash; in nfs4_insert_deviceid_node() local 186 hash = nfs4_deviceid_hash(&new->deviceid); in nfs4_insert_deviceid_node() 187 d = _find_get_deviceid(new->ld, new->nfs_client, &new->deviceid, hash); in nfs4_insert_deviceid_node() 193 hlist_add_head_rcu(&new->node, &nfs4_deviceid_cache[hash]); in nfs4_insert_deviceid_node() 222 _deviceid_purge_client(const struct nfs_client *clp, long hash) in _deviceid_purge_client() argument 230 hlist_for_each_entry_rcu(d, n, &nfs4_deviceid_cache[hash], node) in _deviceid_purge_client()
|
/fs/hpfs/ |
D | dentry.c | 18 unsigned long hash; in hpfs_hash_dentry() local 30 hash = init_name_hash(); in hpfs_hash_dentry() 32 hash = partial_name_hash(hpfs_upcase(hpfs_sb(dentry->d_sb)->sb_cp_table,qstr->name[i]), hash); in hpfs_hash_dentry() 33 qstr->hash = end_name_hash(hash); in hpfs_hash_dentry()
|
/fs/hfs/ |
D | string.c | 58 unsigned int hash, len = this->len; in hfs_hash_dentry() local 63 hash = init_name_hash(); in hfs_hash_dentry() 65 hash = partial_name_hash(caseorder[*name++], hash); in hfs_hash_dentry() 66 this->hash = end_name_hash(hash); in hfs_hash_dentry()
|
/fs/coda/ |
D | cnode.c | 64 unsigned long hash = coda_f2i(fid); in coda_iget() local 66 inode = iget5_locked(sb, hash, coda_test_inode, coda_set_inode, fid); in coda_iget() 74 inode->i_ino = hash; in coda_iget() 121 unsigned long hash = coda_f2i(newfid); in coda_replace_fid() local 129 inode->i_ino = hash; in coda_replace_fid() 130 __insert_inode_hash(inode, hash); in coda_replace_fid() 137 unsigned long hash = coda_f2i(fid); in coda_fid_to_inode() local 144 inode = ilookup5(sb, hash, coda_test_inode, fid); in coda_fid_to_inode()
|
/fs/nfsd/ |
D | export.c | 260 int hash = item->ek_fsidtype; in svc_expkey_hash() local 264 hash ^= hash_mem(cp, len, EXPKEY_HASHBITS); in svc_expkey_hash() 265 hash ^= hash_ptr(item->ek_client, EXPKEY_HASHBITS); in svc_expkey_hash() 266 hash &= EXPKEY_HASHMASK; in svc_expkey_hash() 267 return hash; in svc_expkey_hash() 274 int hash = svc_expkey_hash(item); in svc_expkey_lookup() local 277 hash); in svc_expkey_lookup() 288 int hash = svc_expkey_hash(new); in svc_expkey_update() local 291 &old->h, hash); in svc_expkey_update() 728 int hash; in svc_export_hash() local [all …]
|
/fs/sysfs/ |
D | dir.c | 45 unsigned long hash = init_name_hash(); in sysfs_name_hash() local 48 hash = partial_name_hash(*name++, hash); in sysfs_name_hash() 49 hash = ( end_name_hash(hash) ^ hash_ptr( (void *)ns, 31 ) ); in sysfs_name_hash() 50 hash &= 0x7fffffffU; in sysfs_name_hash() 52 if (hash < 1) in sysfs_name_hash() 53 hash += 2; in sysfs_name_hash() 54 if (hash >= INT_MAX) in sysfs_name_hash() 55 hash = INT_MAX - 1; in sysfs_name_hash() 56 return hash; in sysfs_name_hash() 59 static int sysfs_name_compare(unsigned int hash, const void *ns, in sysfs_name_compare() argument [all …]
|
/fs/ext2/ |
D | xattr.c | 830 __u32 hash = le32_to_cpu(HDR(bh)->h_hash); in ext2_xattr_cache_insert() local 837 error = mb_cache_entry_insert(ce, bh->b_bdev, bh->b_blocknr, hash); in ext2_xattr_cache_insert() 846 ea_bdebug(bh, "inserting [%x] (%d cache entries)", (int)hash, in ext2_xattr_cache_insert() 904 __u32 hash = le32_to_cpu(header->h_hash); in ext2_xattr_cache_find() local 909 ea_idebug(inode, "looking for cached blocks [%x]", (int)hash); in ext2_xattr_cache_find() 912 hash); in ext2_xattr_cache_find() 944 ce = mb_cache_entry_find_next(ce, inode->i_sb->s_bdev, hash); in ext2_xattr_cache_find() 960 __u32 hash = 0; in ext2_xattr_hash_entry() local 965 hash = (hash << NAME_HASH_SHIFT) ^ in ext2_xattr_hash_entry() 966 (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^ in ext2_xattr_hash_entry() [all …]
|
/fs/jbd2/ |
D | revoke.c | 106 struct list_head hash; member 133 static inline int hash(journal_t *journal, unsigned long long block) in hash() function 137 int hash = (int)block ^ (int)((block >> 31) >> 1); in hash() local 139 return ((hash << (hash_shift - 6)) ^ in hash() 140 (hash >> 13) ^ in hash() 141 (hash << (hash_shift - 12))) & (table->hash_size - 1); in hash() 157 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash() 159 list_add(&record->hash, hash_list); in insert_revoke_hash() 179 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record() 183 while (&(record->hash) != hash_list) { in find_revoke_record() [all …]
|
/fs/affs/ |
D | namei.c | 72 unsigned long hash; in __affs_hash_dentry() local 79 hash = init_name_hash(); in __affs_hash_dentry() 82 hash = partial_name_hash(toupper(*name), hash); in __affs_hash_dentry() 83 qstr->hash = end_name_hash(hash); in __affs_hash_dentry() 175 int hash; in affs_hash_name() local 177 hash = len = min(len, 30u); in affs_hash_name() 179 hash = (hash * 13 + toupper(*name++)) & 0x7ff; in affs_hash_name() 181 return hash % AFFS_SB(sb)->s_hashsize; in affs_hash_name()
|
/fs/jbd/ |
D | revoke.c | 106 struct list_head hash; member 133 static inline int hash(journal_t *journal, unsigned int block) in hash() function 156 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in insert_revoke_hash() 158 list_add(&record->hash, hash_list); in insert_revoke_hash() 178 hash_list = &journal->j_revoke->hash_table[hash(journal, blocknr)]; in find_revoke_record() 182 while (&(record->hash) != hash_list) { in find_revoke_record() 187 record = (struct jbd_revoke_record_s *) record->hash.next; in find_revoke_record() 457 list_del(&record->hash); in journal_cancel_revoke() 564 list_del(&record->hash); in journal_write_revoke_records() 736 list_del(&record->hash); in journal_clear_revoke()
|
/fs/logfs/ |
D | dir.c | 100 u32 hash = seed; in hash_32() local 104 hash = hash * 293 + s[i]; in hash_32() 105 return hash; in hash_32() 134 static pgoff_t hash_index(u32 hash, int round) in hash_index() argument 143 return hash % i0_blocks; in hash_index() 145 return i0_blocks + hash % (i1_blocks - i0_blocks); in hash_index() 147 return i1_blocks + hash % (i2_blocks - i1_blocks); in hash_index() 149 return i2_blocks + hash % (i3_blocks - i2_blocks); in hash_index() 151 return i3_blocks + 16 * (hash % (((1<<31) - i3_blocks) / 16)) in hash_index() 162 u32 hash = hash_32(name->name, name->len, 0); in logfs_get_dd_page() local [all …]
|
/fs/gfs2/ |
D | glock.c | 49 int hash; /* hash bucket index */ member 95 static inline void spin_lock_bucket(unsigned int hash) in spin_lock_bucket() argument 97 hlist_bl_lock(&gl_hash_table[hash]); in spin_lock_bucket() 100 static inline void spin_unlock_bucket(unsigned int hash) in spin_unlock_bucket() argument 102 hlist_bl_unlock(&gl_hash_table[hash]); in spin_unlock_bucket() 247 static struct gfs2_glock *search_bucket(unsigned int hash, in search_bucket() argument 254 hlist_bl_for_each_entry_rcu(gl, h, &gl_hash_table[hash], gl_list) { in search_bucket() 730 unsigned int hash = gl_hash(sdp, &name); in gfs2_glock_get() local 735 gl = search_bucket(hash, sdp, &name); in gfs2_glock_get() 760 gl->gl_hash = hash; 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 420 hash = gfs2_disk_hash((const char *)lh, sizeof(struct gfs2_log_header)); in clean_journal() 421 lh->lh_hash = cpu_to_be32(hash); in clean_journal()
|
/fs/adfs/ |
D | dir.c | 205 unsigned long hash; in adfs_hash() local 217 hash = init_name_hash(); in adfs_hash() 225 hash = partial_name_hash(c, hash); in adfs_hash() 227 qstr->hash = end_name_hash(hash); in adfs_hash()
|
/fs/hfsplus/ |
D | unicode.c | 343 unsigned long hash; in hfsplus_hash_dentry() local 349 hash = init_name_hash(); in hfsplus_hash_dentry() 368 hash = partial_name_hash(c2, hash); in hfsplus_hash_dentry() 375 hash = partial_name_hash(c2, hash); in hfsplus_hash_dentry() 378 str->hash = end_name_hash(hash); in hfsplus_hash_dentry()
|
/fs/ |
D | dcache.c | 108 unsigned int hash) in d_hash() argument 110 hash += (unsigned long) parent / L1_CACHE_BYTES; in d_hash() 111 hash = hash + (hash >> D_HASHBITS); in d_hash() 112 return dentry_hashtable + (hash & D_HASHMASK); in d_hash() 400 b = d_hash(dentry->d_parent, dentry->d_name.hash); in __d_shrink() 1279 dentry->d_name.hash = name->hash; in __d_alloc() 1348 q.hash = full_name_hash(q.name, q.len); in d_alloc_name() 1440 unsigned int hash = entry->d_name.hash; in __d_instantiate_unique() local 1455 if (qstr->hash != hash) in __d_instantiate_unique() 1768 unsigned int hash = name->hash; in __d_lookup_rcu() local [all …]
|