STRUCT LPT_SCAN_NODE(9)
πΈ 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 annodepnodeβ where to keep apnodecnodeβ where to keep acnode
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 thennode(if it is annnode) which may be here or in the treeptr.pnodeβ ditto forpnodeptr.cnodeβ ditto forcnode
"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 π
do_calc_lpt_geom(9)ubifs_calc_lpt_geom(9)calc_dflt_lpt_geom(9)pack_bits(9)ubifs_unpack_bits(9)ubifs_pack_pnode(9)ubifs_pack_nnode(9)ubifs_pack_ltab(9)ubifs_pack_lsave(9)ubifs_add_lpt_dirt(9)set_ltab(9)ubifs_add_nnode_dirt(9)add_pnode_dirt(9)calc_nnode_num(9)calc_nnode_num_from_parent(9)calc_pnode_num_from_parent(9)ubifs_create_dflt_lpt(9)update_cats(9)replace_cats(9)check_lpt_crc(9)check_lpt_type(9)unpack_pnode(9)ubifs_unpack_nnode(9)unpack_ltab(9)unpack_lsave(9)validate_nnode(9)validate_pnode(9)set_pnode_lnum(9)ubifs_read_nnode(9)read_pnode(9)read_ltab(9)read_lsave(9)ubifs_get_nnode(9)ubifs_get_pnode(9)ubifs_pnode_lookup(9)ubifs_lpt_lookup(9)dirty_cow_nnode(9)dirty_cow_pnode(9)ubifs_lpt_lookup_dirty(9)ubifs_lpt_calc_hash(9)lpt_check_hash(9)lpt_init_rd(9)lpt_init_wr(9)ubifs_lpt_init(9)scan_get_nnode(9)scan_get_pnode(9)ubifs_lpt_scan_nolock(9)dbg_chk_pnode(9)dbg_check_lpt_nodes(9)
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
- 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