bud_wbuf_callback(9)
๐ bud_wbuf_callback(9) โ like, the UBIFS kernel API manual, bestie ๐ธ
okay so this is a page from the Kernel API Manual and it's all about bud_wbuf_callback, which โ no cap โ is the bud LEB write-buffer synchronization call-back. yes that's a mouthful, we'll get through it together ๐ซถ
โจ NAME โจ
bud_wbuf_callback โ the bud LEB write-buffer synchronization call-back. that's the whole vibe. ๐ซ
๐ฆ SYNOPSIS ๐ฆ
int bud_wbuf_callback (struct ubifs_info *c , int lnum , int free , int
pad );
literally just that one function, she's got four args and she's iconic for it ๐
๐ ARGUMENTS ๐
cโ the UBIFS file-system description object. your main character struct ๐lnumโ the LEB the write-buffer was synchronized to. yes, that LEB ๐freeโ how many free bytes are left in this LEB. budget check, bestie ๐ธpadโ how many bytes were padded. the padding receipt ๐งพ
๐ฅ DESCRIPTION ๐ฅ
so this is a callback function, right? and the way that the I/O unit just calls it when the write-buffer is synchronized? yeah. that's the whole thing. we need this to correctly maintain space accounting in bud logical eraseblocks โ like, the math has to math, and this function is how we make sure it does ๐งฎโจ
it returns zero in case of success and a negative error code in case of failure. zero = slay, negative = something went sideways ๐ญ
and here's the little lore drop: this function actually belongs to the journal, but we keep it here because we want to keep it static. it's living in the wrong neighborhood on purpose, and honestly? valid ๐
๐ SEE ALSO ๐
Kernel file ./fs/ubifs/super.c, and honestly the whole friend group:
validate_inode(9)init_constants_early(9)take_gc_lnum(9)alloc_wbufs(9)free_wbufs(9)free_orphans(9)free_buds(9)check_volume_empty(9)ubifs_parse_param(9)destroy_journal(9)bu_init(9)check_free_space(9)mount_ubifs(9)ubifs_umount(9)ubifs_remount_rw(9)ubifs_remount_ro(9)open_ubi(9)
go read them, they're all in ./fs/ubifs and they ate ๐ฅ๐
anyway that's the page!! it's from ./fs/ubifs, dated October 2026, and it's bud_wbuf_callback(9) forever and always. mwah, bye bestie ๐๐๐ฆ
๐ฆ 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