ubifs_clean_lebs(9)
π ubifs_clean_lebs β yes bestie, we're in the Kernel API Manual (section 9, kernel internals, iykyk) π
β¨ NAME β¨
ubifs_clean_lebs β ok so this one cleans up LEBs that got recovered during a read-only mount. literally its whole job π
π¦ SYNOPSIS π¦
int ubifs_clean_lebs (struct ubifs_info *c , void *sbuf );
πΈ ARGUMENTS πΈ
cβ the UBIFS file-system description object. the main character of the whole struct situation πsbufβ a buffer the size of a LEB that the function gets to use. think of it as the little scrub brush π§
π DESCRIPTION π
so here's the vibe: during recovery, UBIFS spots a LEB that needs to be written β but it wasn't written, because the fs was mounted read-only at the time. no cap, that's just how it went down. π This function goes and cleans that LEB up. When does this actually come up? When you're remounting into read-write mode. that's the moment, that's the slay β¨
This function returns 0 on success and a negative error code on failure. fr fr, that's the whole return contract, no surprises π
π«Ά SEE ALSO π«Ά
the whole friend group, all from the kernel file ./fs/ubifs/recovery.c:
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)clean_an_unclean_leb(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)
ok that's the whole page bestie, go forth and recover responsibly π
sign-off time π this page lives under ./fs/ubifs, dated October 2026, and it's ubifs_clean_lebs(9) β periodt. β¨π¦π
π¦ 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