gfs2_inode_lookup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so this is the manual page for gfs2_inode_lookup(9), straight from the Kernel API Manual, and it does one iconic thing: lookup an inode. no cap πŸ’…


✨ SYNOPSIS ✨

struct inode * gfs2_inode_lookup (struct super_block *sb , unsigned int
       type , u64 no_addr , u64 no_formal_ino , unsigned int blktype );

πŸŽ€ ARGUMENTS πŸŽ€

  • sb β€” the super block. the whole vibe starts here 🫢
  • type β€” the type of the inode.
  • no_addr β€” the inode number.
  • no_formal_ino β€” the inode generation number.
  • blktype β€” requested block type: GFS2_BLKST_DINODE or GFS2_BLKST_UNLINKED; GFS2_BLKST_FREE to indicate not to verify.

πŸ¦‹ DESCRIPTION πŸ¦‹

so if type is DT_UNKNOWN, the inode type is fetched from disk. slay. ✨

if blktype is anything other than GFS2_BLKST_FREE β€” which is literally used as a placeholder because it doesn't otherwise make sense β€” the on-disk block type is verified to be blktype. bestie, that's the vibe check right there πŸ‘‘

when no_formal_ino is non-zero, this function will return ERR_PTR(-ESTALE) if it detects that no_formal_ino doesn't match the actual inode generation number. however, it doesn't always know unless type is DT_UNKNOWN. and that's the plot twist 😭


πŸ’– RETURN πŸ’–

a VFS inode, or an error. that's it, that's the whole energy πŸŽ€


🌈 SEE ALSO 🌈

kernel file ./fs/gfs2/inode.c β€” and the whole squad is here, no one left behind:


and that's the page, bestie πŸ’œ signed off by source ./fs/gfs2 and dated October 2026 β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from