is_idx_node_in_tnc(9)
π is_idx_node_in_tnc π
okay so bestie, welcome to the Kernel API Manual β this lil page is all about is_idx_node_in_tnc, and honestly it's giving "tiny function, big responsibilities". let's get into it π«Ά
β¨ SYNOPSIS β¨
int is_idx_node_in_tnc (struct ubifs_info *c , union ubifs_key *key ,
int level , int lnum , int offs );
literally that's the whole vibe. five arguments, one int back. no cap. π
πΈ ARGUMENTS πΈ
cβ the UBIFS file-system description object. your main character struct, the one that knows everything πkeyβ the key of the index node. yeah, that key πlevelβ the index node level. where it sits in the hierarchy, iykyk π¦lnumβ the LEB number of the index node. that's the physical address vibes πoffsβ the offset of the index node. the little pinpoint inside the LEB β¨
π₯ DESCRIPTION π₯
so here's the tea β β this function returns a whole little spectrum of answers, and you gotta know which one you got:
- returns
0if the index node is not referred to in the TNC π - returns
1if the index node is referred to in the TNC and the corresponding znode is dirty π - returns
2if an index node is referred to in the TNC and the corresponding znode is clean β¨ - returns a negative error code in case of failure π
β οΈ bestie, listen β the key argument has to be the key of the first child. like, that's not optional, that's the whole deal. no substitutions π
also note (and this is such a cute little implementation detail): this function relies on the fact that 0:0 is never a valid LEB number and offset for a main-area node. iconic honestly. the code just trusts that and slays π
π SEE ALSO π
kernel file ./fs/ubifs/tnc.c, and then this absolute wall of friends β fr fr, this function knows everybody:
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_leaf_node_in_tnc(9), ubifs_tnc_has_node(9), ubifs_dirty_idx_node(9), dbg_check_inode_size(9)
likeβ¦ the group chat is huge and every single one of them is in it π§
mwah π this page lives under ./fs/ubifs and it's dated October 2026 β that's the source, the version and the date all in one cute lil sign-off. go read your kernel docs bestie, ily, bye ππ
π¦ 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