get_liability(9)
π get_liability(9) β from the Kernel API Manual, bestie
Okay so real talk, this one's a tiny little page from the Kernel API Manual, section 9, and it's called get_liability. Short and sweet, but she matters, so let's get into it π
β¨ SYNOPSIS β¨
long long get_liability (struct ubifs_info *c );
That's it. That's the whole vibe. Returns a long long, takes one pointer, slays π
πΈ ARGUMENTS πΈ
cβ the UBIFS file-system description object π¦ like, this is your whole filesystem's little ID card, and we're handing it over.
π DESCRIPTION π
So what does she actually do? get_liability() calculates and returns the current UBIFS liability β which, and I cannot stress this enough, means the amount of bytes UBIFS has "promised" to write to the media π
Like... it's the receipts. It's the "yes bestie I said I'd write that" tally. The bytes are promised, not necessarily written yet, and this function hands you the number. Iconic accounting behavior, no cap π
Heads up: the word "promised" is in actual quotes in the source material, so take that energy with you β it's a budget/reservation thing, not a "it's already on disk" thing π
π₯ SEE ALSO π₯
Bestie the cross-references on this one are extensive, so buckle up πΌ
Kernel file ./fs/ubifs/budget.c:
shrink_liability(9)run_gc(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_nolock(9)ubifs_get_free_space(9)
Go read all of them, iykyk π§
Mwah π that's the page! This little angel lives in ./fs/ubifs, and the version we're looking at is dated October 2026 β so mark your calendar, screenshot it, send it to the group chat. 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