函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\inode.c Create Date:2022-07-29 10:38:02
Last Modify:2020-03-18 19:19:59 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:hash

函数原型:static unsigned long hash(struct super_block *sb, unsigned long hashval)

返回类型:unsigned long

参数:

类型参数名称
struct super_block *sb
unsigned longhashval
478  tmp等于hashvalsb按位异或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  返回: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
调用者
名称描述
__insert_inode_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_locked从文件系统上获得索引节点
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
ilookup在高速缓存查找索引节点
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