ubifs_get_free_space_nolock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ubifs_get_free_space_nolock(9) β€” Kernel API Manual πŸ’…

πŸ’– NAME πŸ’–

ubifs_get_free_space_nolock β€” return amount of free space. πŸ’Έβœ¨

✨ SYNOPSIS ✨

long long ubifs_get_free_space_nolock (struct ubifs_info *c );

🌸 ARGUMENTS 🌸

  • c β€” UBIFS file-system description object. that's the whole FS vibe, bestie. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this function literally calculates the amount of free space to report to user-space. πŸ’…

and here's the tea: UBIFS may introduce substantial overhead β€” the index, node headers, alignment, wastage at the end of LEBs, etc. because of all that, it cannot report the real amount of free flash space it has. (also because not all dirty space is reclaimable, UBIFS does not actually know the real amount.) if UBIFS did report the real amount, it would totally bread user expectations about what free space is. users seem accustomed to assuming that if the file-system reports N bytes of free space, they'd be able to fit a file of N bytes to the FS. this almost works for traditional file-systems, because they have way less overhead than UBIFS. so, to keep users happy, UBIFS tries to take the overhead into account. ✨

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./fs/ubifs/budget.c β€” and the whole squad: shrink_liability(9), run_gc(9), get_liability(9), make_free_space(9), ubifs_calc_min_idx_lebs(9), ubifs_calc_available(9), can_use_rp(9), do_budget_space(9), calc_idx_growth(9), calc_data_growth(9), calc_dd_growth(9), ubifs_budget_space(9), ubifs_release_budget(9), ubifs_convert_page_budget(9), ubifs_release_dirty_inode_budget(9), ubifs_reported_space(9), ubifs_get_free_space(9). 🫢


made with πŸ’– from source/version ./fs/ubifs, dated October 2026 β€” catch u on the ubifs_get_free_space_nolock(9) page, bestie! πŸŽ€

πŸ“¦ where this page comes from