clean_buf(9)
π clean_buf(9) β from the Kernel API Manual β¨
okay bestie, buckle up, because today we're reading a manpage straight out of the kernel's clean_buf(9) era β that's the manual name, yes, it's giving "deep in the file system, no thoughts just LEBs" π
πΈ NAME πΈ
clean_buf β she cleans the data out of an LEB that's just sitting there in a buffer. that's it. that's the job. periodt.
β¨ SYNOPSIS β¨
void clean_buf (const struct ubifs_info *c , void **buf , int lnum , int
*offs , int *len );
like, look at that signature. void return, so no receipts come back β everything happens through the pointers. main character energy fr fr π«Ά
π ARGUMENTS π
cβ the UBIFS file-system description object. she's the vibe check for the whole thing, everything runs through her πbufβ the buffer that's getting cleaned. yes, that one. go get her π§lnumβ the LEB number we're cleaning. LEB = logical erase block, if you know you know π¦offsβ the offset we start cleaning from πlenβ how long the buffer is π
π DESCRIPTION π
okay so here's the tea π₯ β this function pads things up to the next min_io_size boundary (only if there actually is one, don't come for her), and then it sets all that empty space to 0xff. all of it. not a single byte left behind π
and the glow-up doesn't stop there β buf, offs and len all get updated to the next c->min_io_size boundary too. so like, they don't just walk away unchanged, they get refreshed. slay β¨
π¦ SEE ALSO π¦
the whole friend group, no cap β kernel file ./fs/ubifs/recovery.c and her besties: is_empty(9), first_non_ff(9), get_master_node(9), write_rcvrd_mst_node(9), ubifs_recover_master_node(9), ubifs_write_rcvrd_mst_node(9), is_last_write(9), no_more_nodes(9), fix_unclean_leb(9), drop_last_group(9), drop_last_node(9), ubifs_recover_leb(9), get_cs_sqnum(9), ubifs_recover_log_leb(9), recover_head(9), ubifs_recover_inl_heads(9), clean_an_unclean_leb(9), ubifs_clean_lebs(9), grab_empty_leb(9), ubifs_rcvry_gc_commit(9), struct size_entry(9), add_ino(9), find_ino(9), remove_ino(9), ubifs_destroy_size_tree(9), ubifs_recover_size_accum(9), fix_size_in_place(9), inode_fix_size(9), ubifs_recover_size(9)
ngl, that's a lot of siblings. go say hi to at least three of them or you're not a real one π
okay that's the whole page, mwah π β this one came from ./fs/ubifs, dated October 2026, and it signs off as clean_buf(9). catch you on the next manpage, bestie ππ
π¦ 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