recover_head(9)
π recover_head(9) β Kernel API Manual, bestie edition
okay so picture this: it's kernel API manual o'clock, the page is recover_head(9), and it's giving "small function, very specific job, absolutely essential." stay with me π«Ά
β¨ NAME β¨
recover_head β recover a head. that's it. that's the whole name. short, iconic, no notes π
πΈ SYNOPSIS πΈ
int recover_head (struct ubifs_info *c , int lnum , int offs , void
*sbuf );
look at her. four arguments, returns an int. main character energy fr fr β¨
π ARGUMENTS π
cβ the UBIFS file-system description object. your whole file system's vibe check in one struct πlnumβ LEB number of the head you wanna recover. yes, that head π¦offsβ offset of the head to recover. like, where in the LEB. the exact spot, bestie πsbufβ an LEB-sized buffer to use. LEB-sized, okay? not smaller. don't come at it with a lil buffer π
π₯ DESCRIPTION π₯
so what does she actually do? she makes sure there is no data on the flash at a head location. that's the whole assignment. clean slate, no leftovers, nothing lingering at that head. periodt πβ¨
and the return value, because we always check the return value:
- returns
0on success π - returns a negative error code on failure π
like yes, two outcomes, no in-between, no "it kinda worked." she's decisive and we love that for her π
ngl the "negative error code" thing is your cue to actually check it. don't just vibe past the return value, bestie. π
π¦ SEE ALSO π¦
all her friends in Kernel file ./fs/ubifs/recovery.c β literally the whole group chat, i'm obsessed:
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)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)
^^ that's the recovery.c extended universe and honestly? they all ate πβ
and that's the page, bestie!! source/version is ./fs/ubifs, dated October 2026, and it's filed under Kernel API Manual. go forth and recover those heads ππ§πΈ
π¦ 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