lookup_level0_dirty(9)
π NAME π
Okay bestie, welcome to lookup_level0_dirty(9) from the Kernel API Manual β yes, we're doing a search for zero-level znode dirtying, and it's kinda iconic π
.
πΈ SYNOPSIS πΈ
int lookup_level0_dirty (struct ubifs_info *c , const union ubifs_key
*key , struct ubifs_znode **zn , int *n );
β¨ ARGUMENTS β¨
cβ UBIFS file-system description object β the context baddie you pass in.keyβ key to lookup β the key we're hunting for, no cap.znβ znode is returned here β the found zero-level znode gets dropped right into this pointer.nβ znode branch slot number is returned here β the slot number comes back through this one.
π¦ DESCRIPTION π¦
So this function looks up the TNC tree and searches for the zero-level znode that refers to key key β¨. The found zero-level znode is returned in zn, bestie.
There are 3 cases, keep up π:
- Exact match β the found zero-level znode contains key
key. Then1is returned, and the slot number of the matched branch is stored innπ. - Not exact match β meaning the zero-level znode does not contain the key. Then
0is returned, and the slot number of the closed branch is stored innπ«Ά. - Key is tiny β so small that it's even less than the lowest key of the leftmost zero-level node. Then
0is returned, and-1is stored innπ.
Additionally, all znodes in the path from the root to the located zero-level znode are marked as dirty π.
Note, when the TNC tree is traversed, some znodes may be absent, then this function reads corresponding indexing nodes and inserts them to TNC. In case of failure, a negative error code is returned π.
π SEE ALSO π
Kernel file ./fs/ubifs/tnc.c and the whole crew, in order:
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)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),is_leaf_node_in_tnc(9)ubifs_tnc_has_node(9),ubifs_dirty_idx_node(9),dbg_check_inode_size(9)
Signed with love from the ./fs/ubifs girlies, October 2026 β catch you in lookup_level0_dirty(9) ππ«Ά
π¦ 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