scan_for_idx_cb(9)
π scan_for_idx_cb β the Kernel API Manual, bestie edition π
ok so real talk, this is scan_for_idx_cb(9) from the Kernel API Manual, and she's a callback. not just any callback β the callback that the scan for a free LEB for the index uses. yes the double "for" is in the original, we don't fix, we stan. π
β¨ SYNOPSIS β¨
int scan_for_idx_cb (struct ubifs_info *c , const struct ubifs_lprops
*lprops , int in_tree , void *arg );
literally the whole signature, character for character, no crumbs left behind. π«Ά
πΈ ARGUMENTS πΈ
cβ the UBIFS file-system description object, iconic, does exactly what it says π¦lpropsβ the LEB properties we're scanning, like the main character of this whole function nglin_treeβ tells you whether the LEB properties are in main memory πargβ the info that gets passed to and from the caller of the scan, so it's a two-way situation, lowkey important π
π₯ DESCRIPTION π₯
ok so here's the vibe: this function returns a code, and that code tells you what the scan should do next. it's giving traffic light energy, three possible exits, no cap:
- the scan should continue β that's
LPT_SCAN_CONTINUEπ - the LEB properties should be added to the tree in main memory β that's
LPT_SCAN_ADDβ¨ - the scan should stop β that's
LPT_SCAN_STOPππ
that's it, that's the whole job, and honestly? she ate. π
π SEE ALSO π
all the besties in the same friend group, fr fr:
- Kernel file
./fs/ubifs/find.cβ the whole source file, go read it iykyk π struct scan_data(9)valuable(9)scan_for_dirty_cb(9)scan_for_dirty(9)ubifs_find_dirty_leb(9)scan_for_free_cb(9)do_find_free_space(9)ubifs_find_free_space(9)scan_for_leb_for_idx(9)ubifs_find_free_leb_for_idx(9)ubifs_save_dirty_idx_lnums(9)scan_dirty_idx_cb(9)find_dirty_idx_leb(9)get_idx_gc_leb(9)find_dirtiest_idx_leb(9)ubifs_find_dirty_idx_leb(9)
every single one, none skipped, we don't do incomplete friend groups here π
little heads up bestie: that SEE ALSO list is the exact list, in the exact order, from the original. don't come for me about the ordering, i don't make the rules, the kernel does. π
and that's the tea, bestie π β this one comes from ./fs/ubifs, dated October 2026, and it's page scan_for_idx_cb(9). mwah, go forth and scan responsibly π
β¨π§
π¦ 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