is_leaf_node_in_tnc(9)
π is_leaf_node_in_tnc(9) π
okay so bestie, welcome to the Kernel API Manual β today's main character is is_leaf_node_in_tnc, and honestly? she's a little detective π΅οΈββοΈ who just wants to know if a node is showing up in the TNC or not. let's get into it β¨
πΈ NAME πΈ
is_leaf_node_in_tnc β determine if a non-indexing not is in the TNC.
yes the manpage literally says "not" instead of "node" π we are NOT fixing her, she's iconic like that. you know what she means π«Ά
β¨ SYNOPSIS β¨
int is_leaf_node_in_tnc (struct ubifs_info *c , union ubifs_key *key ,
int lnum , int offs );
that's the whole vibe. four args, one int coming back at you π
π ARGUMENTS π
cβ the UBIFS file-system description object. your whole filesystem context, basically the group chat she's asking about π¬keyβ node key. the ID badge of the node in question πͺͺlnumβ node LEB number. which LEB it's chilling in πoffsβ node offset. exactly where inside that LEB it sits π
π¦ DESCRIPTION π¦
so here's the tea β this function returns 1 if the node is referred to in the TNC, 0 if it is not, and a negative error code in case of failure. three possible outcomes, one int, no cap π₯
β οΈ heads up bestie: this function relies on the fact that 0:0 is never a valid LEB number and offset for a main-area node. that's the whole trick she's built on β do not come for her assumptions, she's aware π
π SEE ALSO π
Kernel file ./fs/ubifs/tnc.c β and okay this list is LONG, so buckle up, we're naming everyone in the friend group ππ
insert_old_idx(9)insert_old_idx_znode(9)ins_clr_old_idx_znode(9)destroy_old_idx(9)copy_znode(9)add_idx_dirt(9)replace_znode(9)dirty_cow_znode(9)lnc_add(9)lnc_free(9)tnc_read_hashed_node(9)try_read_node(9)fallible_read_node(9)matches_name(9)get_znode(9)tnc_next(9)tnc_prev(9)resolve_collision(9)fallible_matches_name(9)fallible_resolve_collision(9)matches_position(9)resolve_collision_directly(9)dirty_cow_bottom_up(9)ubifs_lookup_level0(9)lookup_level0_dirty(9)maybe_leb_gced(9)ubifs_tnc_locate(9)ubifs_tnc_get_bu_keys(9)read_wbuf(9)validate_data_node(9)ubifs_tnc_bulk_read(9)do_lookup_nm(9)ubifs_tnc_lookup_nm(9)ubifs_tnc_lookup_dh(9)correct_parent_keys(9)insert_zbranch(9)tnc_insert(9)ubifs_tnc_add(9)ubifs_tnc_replace(9)ubifs_tnc_add_nm(9)tnc_delete(9)ubifs_tnc_remove(9)ubifs_tnc_remove_nm(9)ubifs_tnc_remove_dh(9)key_in_range(9)ubifs_tnc_remove_range(9)ubifs_tnc_remove_ino(9)ubifs_tnc_next_ent(9)tnc_destroy_cnext(9)ubifs_tnc_close(9)left_znode(9)right_znode(9)lookup_znode(9)is_idx_node_in_tnc(9)ubifs_tnc_has_node(9)ubifs_dirty_idx_node(9)dbg_check_inode_size(9)
every single one, accounted for, nobody left on read πβ¨
okay that's the page!! mwah π this whole thing lives in ./fs/ubifs and it's stamped October 2026 β so go forth, call your leaf-node checker, and slay π§ββοΈπΈπ
π¦ 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