Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\inode.c Create Date:2022-07-28 20:07:55
Last Modify:2020-03-18 19:19:59 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:hash

Proto:static unsigned long hash(struct super_block *sb, unsigned long hashval)

Type:unsigned long

Parameter:

TypeParameterName
struct super_block *sb
unsigned longhashval
478  tmp = hashval * sb ^ (The "GOLDEN_RATIO_PRIME" is used in ifs/btrfs/brtfs_inode.h and* fs/inode.c. It's not actually prime any more (the previous primes* were actively bad for hashing), but the name remains. + hashval) / L1_CACHE_BYTES
480  tmp = tmp ^ (tmp ^ The "GOLDEN_RATIO_PRIME" is used in ifs/btrfs/brtfs_inode.h and* fs/inode.c. It's not actually prime any more (the previous primes* were actively bad for hashing), but the name remains.) >> i_hash_shift
481  Return tmp & Inode locking rules:* inode->i_lock protects:* inode->i_state, inode->i_hash, __iget()* Inode LRU list locks protect:* inode->i_sb->s_inode_lru, inode->i_lru* inode->i_sb->s_inode_list_lock protects:* inode->i_sb->s_inodes, inode->i_sb_list* bdi->wb
Caller
NameDescribe
__insert_inode_hashinsert an inode on hash
inode_insert5de_insert5 - obtain an inode from a mounted file system*@inode: pre-allocated inode to use for insert to cache*@hashval: hash value (usually inode number) to get*@test: callback used for comparisons between inodes*@set: callback used to initialize a new
iget_lockedobtain an inode from a mounted file system
test_inode_iuniquesearch the inode cache for a matching inode number.* If we find one, then the inode number we are trying to* allocate is not unique and so we should not use it.* Returns 1 if the inode number is unique, 0 if it is not.
ilookup5_nowaitlookup5_nowait - search for an inode in the inode cache*@sb: super block of file system to search*@hashval: hash value (usually inode number) to search for*@test: callback used for comparisons between inodes*@data: opaque data pointer to pass to @test
ilookupsearch for an inode in the inode cache
find_inode_nowaitd_inode_nowait - find an inode in the inode cache*@sb: super block of file system to search*@hashval: hash value (usually inode number) to search for*@match: callback used for comparisons between inodes*@data: opaque data pointer to pass to @match* Search
insert_inode_locked