write_index(9)
π write_index(9) β like, the kernel API manual era π
okay so bestie, welcome to write_index from the Kernel API Manual β yes that's the manual name, we're being β¨officialβ¨ today. this is a <linux/...> kernel function page and honestly it's giving very niche, very UBIFS, very iykyk. let's get into it π¦
β¨ NAME β¨
write_index β writes index nodes. that's it. that's the whole vibe. it writes them. π
πΈ SYNOPSIS πΈ
int write_index (struct ubifs_info *c );
note the space before that closing paren, bestie β copy it exactly like that, we don't fix what isn't broken π«Ά
π ARGUMENTS π
cβ the UBIFS file-system description object, aka the main character of this whole situation π this is the thing you pass in, it's astruct ubifs_info *, and it's literally the entire personality of the file system in one pointer.
π₯ DESCRIPTION π₯
so like. this function writes the index nodes. which index nodes, you ask? the ones whose positions were laid out by the layout_in_empty_space function. π§
that's the whole bit, no cap. write_index doesn't decide where stuff goes β that's not its job, that's not its era β it just takes the positions that layout_in_empty_space already figured out and actually writes the index nodes there. think of it as the friend who shows up after the plan is made and executes it flawlessly. main character energy, but a team player. periodt. π
it returns an int, and that's all the manpage tells us about the return value, so we're not gonna invent lore about it. π
π¦ SEE ALSO π¦
okay this list is long and we are gonna read every single one because that's the rule and also because these are all lowkey iconic:
- Kernel file
./fs/ubifs/tnc_commit.c make_idx_node(9)fill_gap(9)find_old_idx(9)is_idx_node_in_use(9)layout_leb_in_gaps(9)get_leb_cnt(9)layout_in_gaps(9)layout_in_empty_space(9)layout_commit(9)find_first_dirty(9)find_next_dirty(9)get_znodes_to_commit(9)alloc_idx_lebs(9)free_unused_idx_lebs(9)free_idx_lebs(9)ubifs_tnc_start_commit(9)free_obsolete_znodes(9)return_gap_lebs(9)ubifs_tnc_end_commit(9)
that's twenty of them. twenty! we listed them all. you're welcome. go read them, they're literally all in ./fs/ubifs/tnc_commit.c bestie, have fun π
and that's the page!! π this little ray of sunshine lives in ./fs/ubifs and it's dated October 2026, so like, mark your calendar, and it's page write_index(9) in case you forgot what you were reading in the last 30 seconds. mwah πππ¦
π¦ 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