clean_an_unclean_leb(9)
π clean_an_unclean_leb(9) β like, the Kernel API Manual but make it cute π
okay so bestie, welcome to clean_an_unclean_leb(9) from the Kernel API Manual β¨ this is the little recovery baddie that literally reads and writes a LEB to remove corruption. she's giving janitor energy but make it iconic π
πΈ NAME πΈ
clean_an_unclean_leb β read and write a LEB to remove corruption. that's it. that's the whole vibe. no cap π«Ά
β¨ SYNOPSIS β¨
int clean_an_unclean_leb (struct ubifs_info *c , struct
ubifs_unclean_leb *ucleb , void *sbuf );
she takes three things and returns an int, slay π
π¦ ARGUMENTS π¦
cβ the UBIFS file-system description object. the whole personality of the filesystem lives in here fr fr πuclebβ unclean LEB information. yes bestie, the dirty little LEB info, it's all in here πsbufβ a LEB-sized buffer to use. LEB-sized. not "roughly the size", LEB-sized. respect the spec π
π₯ DESCRIPTION π₯
so what does she actually do? okay so picture this: she reads a LEB up to a point that's pre-determined by the mount recovery (mount recovery is the main character here, she's just following the map πΊοΈ), checks the nodes, and then writes the result back to the flash. and that's how she cleans off any following corruption β or any non-fatal ECC errors. corruption? not on her watch. ECC errors that are non-fatal? also evicted πβ¨
it's giving "scrub the timeline" energy and honestly? obsessed.
lowkey important: this function returns 0 on success and a negative error code on failure. zero means she ate, negative means something went off and you should probably look at it π
π SEE ALSO π
Kernel file ./fs/ubifs/recovery.c β and like, the entire friend group, no one left out π«Ά
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)clean_buf(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)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)
and that's the whole page, bestie π this one's from ./fs/ubifs, dated October 2026, and it's clean_an_unclean_leb(9) β go forth and clean those LEBs, you absolute icon π§βπ
π¦ 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