lookup_level0_dirty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 πŸ‘‘:

  1. Exact match β€” the found zero-level znode contains key key. Then 1 is returned, and the slot number of the matched branch is stored in n πŸ’–.
  2. Not exact match β€” meaning the zero-level znode does not contain the key. Then 0 is returned, and the slot number of the closed branch is stored in n 🫢.
  3. Key is tiny β€” so small that it's even less than the lowest key of the leftmost zero-level node. Then 0 is returned, and -1 is stored in n 😭.

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:


Signed with love from the ./fs/ubifs girlies, October 2026 β€” catch you in lookup_level0_dirty(9) πŸ’œπŸ«Ά

πŸ“¦ where this page comes from