STRUCT LPT_SCAN_NODE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct lpt_scan_node(9) 🌸

okay bestie, welcome to the Kernel API Manual β€” this is the page for struct lpt_scan_node, and yes it's giving "tiny struct with main character energy" ✨

✨ NAME ✨

struct lpt_scan_node β€” literally just somewhere to put nodes while we scan LPT. that's it. that's the whole job. πŸ’…

✨ SYNOPSIS ✨

struct lpt_scan_node {
    union {
      struct ubifs_nnode nnode;
      struct ubifs_pnode pnode;
      struct ubifs_cnode cnode;
    };
    int in_tree;
    union {
      struct ubifs_nnode *nnode;
      struct ubifs_pnode *pnode;
      struct ubifs_cnode *cnode;
    } ptr;
 };

like, look at it. two anonymous-ish unions and a little int in the middle. she's compact, she's functional, she's slay πŸŽ€

✨ Members ✨

  • {unnamed_union} β€” anonymous. no name, no problem, she's mysterious like that πŸ¦‹
  • nnode β€” where to keep a nnode
  • pnode β€” where to keep a pnode
  • cnode β€” where to keep a cnode

so basically the top union is your little storage cubby: whichever kind of node you've got, there's a slot for it. obsessed 🫢

  • in_tree β€” is the node in the tree in memory. yep, that's the vibe check right there β€” this little flag tells you whether the node is currently chilling in the in-memory tree or not 🌈
  • ptr β€” union of node pointers. three flavours, pick yours πŸ’–
    • ptr.nnode β€” pointer to the nnode (if it is an nnode) which may be here or in the tree
    • ptr.pnode β€” ditto for pnode
    • ptr.cnode β€” ditto for cnode

"ditto" is doing so much heavy lifting here and honestly? iconic. it means the exact same deal as ptr.nnode: the pointer may point to the node right here, or to the one in the tree. no cap πŸ”₯


✨ SEE ALSO ✨

heads up bestie: these all live in the kernel file ./fs/ubifs/lpt.c β€” the whole squad's listed below, and yes you get all of them, no skipping πŸ’€

and that's the whole page, bestie β€” go read the LPT lore, it's a whole universe πŸŒΈπŸ’œ

sign-off era: this one came out of ./fs/ubifs and is dated October 2026. mwah πŸ’‹βœ¨
πŸ“¦ where this page comes from