ilookup5(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 to test. 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