Lines Matching refs:hash

374 static void ext4_xattr_inode_set_hash(struct inode *ea_inode, u32 hash)
376 inode_set_atime(ea_inode, hash, 0);
452 * implementation does not have hash validation, rather it has a
490 u32 hash;
492 /* Verify stored hash matches calculated hash. */
493 hash = ext4_xattr_inode_hash(EXT4_SB(ea_inode->i_sb), buffer, size);
494 if (hash != ext4_xattr_inode_get_hash(ea_inode))
500 /* Verify entry hash. */
501 tmp_data = cpu_to_le32(hash);
509 * Not good. Maybe the entry hash was calculated
518 /* Let people know about old hash */
519 pr_warn_once("ext4: filesystem with signed xattr name hash");
559 "EA inode hash validation failed");
1274 u32 hash, ref;
1285 hash = le32_to_cpu(BHDR(bh)->h_hash);
1296 oe = mb_cache_entry_delete_or_get(ea_block_cache, hash,
1325 ce = mb_cache_entry_get(ea_block_cache, hash,
1463 struct inode *inode, u32 hash)
1490 ext4_xattr_inode_set_hash(ea_inode, hash);
1518 size_t value_len, u32 hash)
1528 ce = mb_cache_entry_find_first(ea_inode_cache, hash);
1572 u32 hash;
1580 hash = ext4_xattr_inode_hash(EXT4_SB(inode->i_sb), value, value_len);
1581 ea_inode = ext4_xattr_inode_cache_find(inode, value, value_len, hash);
1590 ea_inode = ext4_xattr_inode_create(handle, inode, hash);
1604 mb_cache_entry_create(EA_INODE_CACHE(inode), GFP_NOFS, hash,
1809 __le32 hash = 0;
1811 /* Entry hash calculation. */
1816 * Feed crc32c hash instead of the raw value for entry
1817 * hash calculation. This is to avoid walking
1822 hash = ext4_xattr_hash_entry(here->e_name,
1829 hash = ext4_xattr_hash_entry(here->e_name,
1833 here->e_hash = hash;
1931 __u32 hash = le32_to_cpu(BHDR(bs->bh)->h_hash);
1942 hash, bs->bh->b_blocknr);
3041 __u32 hash = le32_to_cpu(header->h_hash);
3048 error = mb_cache_entry_create(ea_block_cache, GFP_NOFS, hash,
3054 ea_bdebug(bh, "inserting [%x]", (int)hash);
3110 __u32 hash = le32_to_cpu(header->h_hash);
3118 ea_idebug(inode, "looking for cached blocks [%x]", (int)hash);
3119 ce = mb_cache_entry_find_first(ea_block_cache, hash);
3146 * Compute the hash of an extended attribute.
3151 __u32 hash = 0;
3154 hash = (hash << NAME_HASH_SHIFT) ^
3155 (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^
3159 hash = (hash << VALUE_HASH_SHIFT) ^
3160 (hash >> (8*sizeof(hash) - VALUE_HASH_SHIFT)) ^
3163 return cpu_to_le32(hash);
3169 * Compute the hash of an extended attribute incorrectly.
3173 __u32 hash = 0;
3176 hash = (hash << NAME_HASH_SHIFT) ^
3177 (hash >> (8*sizeof(hash) - NAME_HASH_SHIFT)) ^
3181 hash = (hash << VALUE_HASH_SHIFT) ^
3182 (hash >> (8*sizeof(hash) - VALUE_HASH_SHIFT)) ^
3185 return cpu_to_le32(hash);
3196 * Re-compute the extended attribute hash value after an entry has changed.
3201 __u32 hash = 0;
3206 /* Block is not shared if an entry's hash value == 0 */
3207 hash = 0;
3210 hash = (hash << BLOCK_HASH_SHIFT) ^
3211 (hash >> (8*sizeof(hash) - BLOCK_HASH_SHIFT)) ^
3215 header->h_hash = cpu_to_le32(hash);