dbg_walk_index(9)
π dbg_walk_index(9) β like, the UBIFS index walker, bestie
okay so real talk, this page lives in the Kernel API Manual (section 9, kernel-space tea β) and it's all about dbg_walk_index. come sit, I'll hype you up on what it does π«Ά
β¨ NAME β¨
dbg_walk_index β walk the on-flash index. that's it, that's the vibe. no cap. πΆββοΈπ«
πΈ SYNOPSIS πΈ
int dbg_walk_index (struct ubifs_info *c , dbg_leaf_callback leaf_cb ,
dbg_znode_callback znode_cb , void *priv );
literally the whole signature, character for character, don't @ me. returns an int, takes four things. iconic. π
π ARGUMENTS π
cβ the UBIFS file-system description object. it's giving "context", it's giving "everything you need to know about this fs". πleaf_cbβ this one gets called for each leaf node. every single one, bestie. πΏznode_cbβ and this one gets called for each indexing node. different callback, different job, both invited to the party. π¦privβ your private data, which gets passed straight through to the callbacks. like a little goodie bag you hand to both of them. π
π₯ DESCRIPTION π₯
So what does this thing actually do? It walks the UBIFS index, and along the way it calls leaf_cb for each leaf node and znode_cb for each indexing node. that's the whole loop, and honestly? obsessed. π
It returns zero in case of success β and a negative error code in case of failure. so like, 0 = slay, negative = π.
heads-up, and this is straight from the source, not me being dramatic: it would be better if this function removed every znode it pulled into the TNC, so that the behavior more closely matched the non-debugging behavior. so yeah, lowkey a known "could be better" situation. noted. π«‘
π SEE ALSO π
the whole friend group, and yes I'm listing every single one because nobody gets left out:
- Kernel file
./fs/ubifs/debug.cβubifs_dump_index(9) dbg_save_space_info(9)dbg_check_space_info(9)dbg_check_synced_i_size(9)dbg_check_key_order(9)dbg_check_znode(9)dbg_check_tnc(9)add_size(9)dbg_check_idx_size(9)struct fsck_inode(9)struct fsck_data(9)add_inode(9)search_inode(9)read_add_inode(9)check_leaf(9)free_inodes(9)check_inodes(9)dbg_check_filesystem(9)dbg_check_data_nodes_order(9)dbg_check_nondata_nodes_order(9)provide_user_output(9)interpret_user_input(9)dbg_debugfs_init_fs(9)dbg_debugfs_exit_fs(9)dbg_debugfs_init(9)dbg_debugfs_exit(9)ubifs_debugging_init(9)ubifs_debugging_exit(9)
and that's the page!! π shoutout to the fine folks over at ./fs/ubifs for this one, dated October 2026 β go read the source, it's giving main character energy, iykyk β¨π§
π¦ 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