ilookup5(9)
π ilookup5(9) π
okay bestie, welcome to the Kernel API Manual page for ilookup5(9) β inode-cache search but make it glam β¨. This is the one where you're looking for an inode by a hash value and some opaque data, not just by inode number, and it's giving generalized version energy for ilookup, iykyk.
β¨ NAME β¨
ilookup5 β search for an inode in the inode cache π
π¦ SYNOPSIS π¦
struct inode * ilookup5 (struct super_block *sb , u64 hashval , int
(*test)(struct inode *, void *) , void *data );
π ARGUMENTS π
sbβ super block of file system to search. This is the main character file system block, periodt.hashvalβ hash value (usually inode number) to search for. Not always enough by itself, which is literally why this function exists.testβ callback used for comparisons between inodes. It's the little vibe check for inodes, no cap.dataβ opaque data pointer to pass totest. Opaque means opaque, bestie β it gets handed straight through.
πΈ DESCRIPTION πΈ
Search for the inode specified by hashval and data in the inode cache. If the inode is in the cache, return the inode with an incremented reference count. It waits on I_NEW before returning the inode. And yes, it is returned with an incremented reference count β the original says it twice, so we're keeping both receipts π§Ύπ
.
This is a generalized version of ilookup for file systems where the inode number is not sufficient for unique identification of an inode. So if your filesystem needs extra comparison sauce, this is the icon for you π. fr fr.
β οΈ NOTE β οΈ
Real talk: test is called with the inode_hash_lock held, so it can't sleep. No naps, no snoozing, no βjust one lil napβ β can't sleep, bestie π.
π SEE ALSO π
Kernel file ./fs/inode.c, plus the whole squad: inode_init_always_gfp(9), alloc_inode(9), drop_nlink(9), clear_nlink(9), set_nlink(9), inc_nlink(9), inode_sb_list_add(9), __insert_inode_hash(9), __remove_inode_hash(9), evict_inodes(9), new_inode(9), unlock_new_inode(9), lock_two_nondirectories(9), unlock_two_nondirectories(9), inode_insert5(9), iget5_locked(9), iget5_locked_rcu(9), iget_locked(9), iunique(9), ihold(9), ilookup5_nowait(9), ilookup(9), find_inode_nowait(9), find_inode_rcu(9), find_inode_by_ino_rcu(9), iput(9), iput_not_last(9), bmap(9), inode_update_time(9), generic_update_time(9), atime_needs_update(9), file_remove_privs(9), current_time(9), file_update_time(9), file_modified_flags(9), file_modified(9), kiocb_modified(9), inode_init_owner(9), inode_owner_or_capable(9), inode_dio_wait(9), timestamp_truncate(9), inode_set_ctime_current(9), inode_set_ctime_deleg(9), in_group_or_capable(9), mode_strip_sgid(9), dump_inode(9).
cute sign-off: source/version ./fs, dated October 2026, and the manual name is ilookup5(9) β slay, we're done πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms