Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\namei.c Create Date:2022-07-28 20:05:06
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Return the "hash_len" (hash and length) of a null-terminated string

Proto:u64 hashlen_string(const void *salt, const char *name)

Type:u64

Parameter:

TypeParameterName
const void *salt
const char *name
2014  hash = Hash courtesy of the R5 hash in reiserfs modulo sign bits (salt)
2015  len = 0
2017  c = (unsigned char) * name
2018  When c cycle
2019  len++
2020  hash = partial hash update function. Assume roughly 4 bits per character
2021  c = name[len]
2023  Return hashlen_create(Finally: cut down the number of bits to a int value (and try to avoid* losing bits). This also has the property (wanted by the dcache)* that the msbits make a good hash table index., len)
Caller
NameDescribe
d_alloc_name
test_hash_init