STRUCT RADIX_TREE_ITER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct radix_tree_iter πŸ’…

okay so bestie, welcome to the struct radix_tree_iter page β€” it's a kernel API manual situation, and this struct is literally the it-girl of radix tree iteration state πŸ‘‘


🌸 NAME 🌸

struct radix_tree_iter β€” radix tree iterator state. that's it, that's the vibe πŸŽ€


✨ SYNOPSIS ✨

struct radix_tree_iter {
    unsigned long   index;
    unsigned long   next_index;
    unsigned long   tags;
    struct radix_tree_node *node;
};

πŸ¦‹ Members πŸ¦‹

  • index β€” index of current slot. the now. the main character slot πŸ’«
  • next_index β€” one beyond the last index for this chunk. like, "one past the end", classic πŸ”₯
  • tags β€” bit-mask for tag-iterating. yep, a whole mask just for tags πŸ’…
  • node β€” node that contains current slot. it's giving "where the slot actually lives" 🏠

🧚 Description 🧚

okay so the way this works: this radix tree iterator thinks in terms of "chunks" of slots, no cap. a chunk is a subinterval of slots that lives inside one radix tree leaf node 🌿

each chunk gets described by two things: a pointer to its first slot, and a struct radix_tree_iter that holds the chunk's position in the tree and its size. two-for-one deal, we love to see it 🫢

and for the tagged iteration girlies? radix_tree_iter also holds the slots' bit-mask for one chosen radix tree tag ⭐ that's the whole point of the tags member.


πŸ’œ SEE ALSO πŸ’œ

kernel file ./include/linux/radix-tree.h

like, go read those next, iykyk πŸ“š


lowkey tho β€” this whole page is from the ./include/linux source, version dated October 2026 ⭐ so yeah, that's the era we're in, bestie. anyway ily, go iterate those chunks, slay πŸ’–πŸ¦‹βœ¨
πŸ“¦ where this page comes from