dir_e_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ dir_e_read(9) ✨

okay so bestie, welcome to dir_e_read β€” it's a kernel API manual page (yes, 9 is the section, that's the kernel devs section, iykyk) and honestly? it's giving "small function, big responsibilities." πŸ’…

The whole manual name situation is dir_e_read(9) and it lives in the Kernel API Manual, so like… that's the vibe check. Let's get into it 🫢


🌸 NAME 🌸

dir_e_read β€” literally reads the entries from a directory into a filldir buffer. that's it, that's the whole job. no cap. πŸ“–βœ¨


πŸŽ€ SYNOPSIS πŸŽ€

int dir_e_read (struct inode *inode , struct dir_context *ctx , struct file_ra_state *f_ra );

she takes three args and returns an int. periodt. πŸ”₯


πŸ¦‹ ARGUMENTS πŸ¦‹

  • inode β€” the directory inode πŸ‘‘ like, the actual directory object itself, the main character.
  • ctx β€” the actor to feed the entries to πŸ“ think of it as the callback-ish thing that gets handed each entry, very "here bestie, take this."
  • f_ra β€” the read-ahead parameters 🌈 the lil settings that tell the kernel how much to prefetch. obsessed with a good read-ahead config, ngl.

⭐ RETURN ⭐

errno β€” yep, that's the return value, exactly as written. πŸ’€ that's the whole section. we love a concise king.


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./fs/gfs2/dir.c β€” and then a whole friend group of functions, all listed here verbatim because every single one matters: 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), gfs2_dir_search(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).

fr fr go read those next, that's the whole friend group and they all ate. πŸ”₯

and that's the page!! 🌸 cute lil sign-off: this one comes from the source/version ./fs/gfs2, dated October 2026, and the page itself is dir_e_read(9). mwah πŸ’‹ go read a directory, bestie πŸ§šβ€β™€οΈπŸ’–

πŸ“¦ where this page comes from