gfs2_dir_search(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ gfs2_dir_search(9) β€” the kernel API manual, but make it a group chat πŸ¦‹

okay so bestie, we're in the Kernel API Manual today and the main character is gfs2_dir_search β€” she's a directory search function and she literally ate. no cap.


✨ NAME ✨

gfs2_dir_search β€” Search a directory πŸ’…

🌸 SYNOPSIS 🌸

struct inode * gfs2_dir_search (struct inode *dir , const struct qstr
*name , bool fail_on_exist );

πŸŽ€ ARGUMENTS πŸŽ€

  • dir β€” The GFS2 directory inode. this is the directory we're snooping around in, she's the setting of the whole scene 🏠
  • name β€” The name we are looking up. the thing we're hunting for, the vibe check target πŸ”
  • fail_on_exist β€” Fail if the name exists rather than looking it up. like, plot twist: instead of going and fetching the whole thing, we just bail the second we find out she's already there. dramatic? yes. useful? also yes πŸ’€

🧚 DESCRIPTION 🧚

so this routine searches a directory for a file or another directory. literally that's the job. it's giving "where's that thing" energy but in kernel space 🫢

⭐ important caveat, do not skip: this assumes a glock is held on dip. so like, the lock is already taken care of before you call her β€” don't come in here unlocked, bestie, that's not the move πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

errno β€” yeah, she returns an errno. that's the whole return section, she's a woman of few words 😭

πŸ‘‘ SEE ALSO πŸ‘‘

okay this list is long but every single one is here because they're all iconic in their own right. Kernel file ./fs/gfs2/dir.c, plus:


and that's the whole page, bestie, you understood it perfectly, i'm so proud πŸ₯Ή

signing off from ./fs/gfs2 β€” it's giving October 2026, Kernel API Manual era, and honestly? we ate that πŸ’…βœ¨

πŸ“¦ where this page comes from