gfs2_dir_exhash_dealloc(9)
π« gfs2_dir_exhash_dealloc(9) π«
okay so bestie, welcome to the Kernel API Manual β¨ β this one's a lil kernel-function page from the gfs2 filesystem, and honestly? it's a whole vibe. it does exactly one job and it does it iconically. let's get into it π«Ά
πΈ NAME πΈ
gfs2_dir_exhash_dealloc β frees all the leaf blocks in a directory. that's it. that's the function. she's a deleter, a liberator, a leaf-block-clearing queen π
π SYNOPSIS π
int gfs2_dir_exhash_dealloc (struct gfs2_inode *dip );
one argument, one int coming back at you. lowkey elegant ngl π
π¦ ARGUMENTS π¦
dipβ the directory. like, the directory inode itself. that's the whole parameter, bestie, she's not complicated π
π₯ DESCRIPTION π₯
so here's the tea β β this function deallocates all the on-disk directory leaves, setting them to the FREEMETA state. free them, release them, let them go, periodt π
and then (this is the main character plot twist β¨) it changes the on-disk inode type to "regular file" β yes, in quotes in the original, and yes we're keeping the quotes, fr fr. so a directory literally becomes a regular file. it's giving transformation arc π§
ngl it's doing in-place on-disk surgery here β leaves βFREEMETA, inode type β"regular file". just so we're all clear on what's being written where π
β RETURN β
returns errno. that's it. that's the return value. classic π―
π SEE ALSO π
okay this is the part where we tag everyone in the group chat π the whole kernel file lives at ./fs/gfs2/dir.c and here's the full squad:
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)gfs2_dir_search(9)dir_new_leaf(9)gfs2_dir_add(9)gfs2_dir_del(9)gfs2_dir_mvino(9)leaf_dealloc(9)gfs2_diradd_alloc_required(9)
no cap, that's the whole crew. go read them too, iykyk πΈ
and that's the page, bestie!! π this lil beauty lives under ./fs/gfs2 and the manual's dated October 2026 β so yeah, future-dated kernel docs, we love to see it β°β¨ mwah, stan a filesystem function that knows what it wants ππ¦
π¦ 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