gfs2_dir_search(9)
π¦ 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:
gfs2_dir_write_data(9)gfs2_dir_read_data(9)gfs2_dir_get_hash_table(9)gfs2_dir_hash_inval(9)dirent_next(9)dirent_del(9)get_leaf_nr(9)dir_make_exhash(9)dir_split_leaf(9)dir_double_exhash(9)compare_dents(9)do_filldir_main(9)gfs2_dir_readahead(9)dir_e_read(9)dir_new_leaf(9)gfs2_dir_add(9)gfs2_dir_del(9)gfs2_dir_mvino(9)leaf_dealloc(9)gfs2_dir_exhash_dealloc(9)gfs2_diradd_alloc_required(9)
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
- 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