ubifs_calc_dark(9)
π ubifs_calc_dark(9) β the Kernel API Manual, bestie edition β¨
okay so before we even start, you should know this page lives in the Kernel API Manual, and it's all about our girl ubifs_calc_dark. she's doing one job and doing it cute. let's get into it π«Ά
πΈ SYNOPSIS πΈ
int ubifs_calc_dark (const struct ubifs_info *c , int spc );
literally that's the whole thing. short, sweet, iconic π
π ARGUMENTS π
cβ the UBIFS file-system description object. yes bestie, the whole file system, all up in one struct. she's the main character, everything else is a supporting role πspcβ the amount of free and dirty space in the LEB. both. at once. she contains multitudes π¦
β¨ DESCRIPTION β¨
so this function calculates and returns the amount of dark space in an LEB that has spc bytes of free and dirty space. that's the whole vibe check π₯
now, what even is dark space? glad you asked, because it's giving "space that might not be usable." UBIFS is out here trying to account for all of it β like, it's keeping track of the square footage that just isn't gonna work out for anybody. and that space? we call it "dark space." spooky name, very practical concept π
the example i need you to internalize: if an LEB has only 512 free bytes, that's dark space, because it cannot fit a large data node. like, sweetie, there's just not enough room π the space is there but it's not useful space, and that's the whole point β she's counting the space that's technically free but functionally pointless. no cap π―
π SEE ALSO π
okay this list is long, so buckle up, we're doing the whole squad, all from the Kernel file ./fs/ubifs/lprops.c:
get_heap_comp_val(9)move_up_lpt_heap(9)adjust_lpt_heap(9)add_to_lpt_heap(9)remove_from_lpt_heap(9)lpt_heap_replace(9)ubifs_add_to_cat(9)ubifs_remove_from_cat(9)ubifs_replace_cat(9)ubifs_ensure_cat(9)ubifs_categorize_lprops(9)change_category(9)is_lprops_dirty(9)ubifs_change_lp(9)ubifs_get_lp_stats(9)ubifs_change_one_lp(9)ubifs_update_one_lp(9)ubifs_read_one_lp(9)ubifs_fast_find_free(9)ubifs_fast_find_empty(9)ubifs_fast_find_freeable(9)ubifs_fast_find_frdi_idx(9)dbg_check_cats(9)scan_check_cb(9)dbg_check_lprops(9)
like i said. the whole squad. go read them, they're all obsessed with property accounting too π§π
lowkey if you only remember one thing: spc goes in, dark space comes out, and small leftover free bytes are still "dark" because nothing big fits in them. periodt π
and that's the page, bestie!! π this one's from ./fs/ubifs, dated October 2026, and it's filed under ubifs_calc_dark(9) β mwah, go be great, and remember: dark space is real and it's coming for your free bytes πβ
π¦ 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