STRUCT NILFS_BTREE_PATH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct nilfs_btree_path(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ today we're decoding struct nilfs_btree_path and honestly? she's kind of a main character.


🌸 NAME 🌸

struct nilfs_btree_path β€” a path on which B-tree operations are executed

like, literally the lil walkway the B-tree does its whole thing on 🫢 no cap.


✨ SYNOPSIS ✨

struct nilfs_btree_path {
    struct buffer_head *bp_bh;
    struct buffer_head *bp_sib_bh;
    int bp_index;
    union nilfs_bmap_ptr_req bp_oldreq;
    union nilfs_bmap_ptr_req bp_newreq;
    struct nilfs_btnode_chkey_ctxt bp_ctxt;
    void (*bp_op)(struct nilfs_bmap *, struct nilfs_btree_path *, int,
__u64 *, __u64 *);
 };

copy this exactly or the compiler WILL humble you 😭


πŸŽ€ Members πŸŽ€

  • bp_bh β€” buffer head of node block πŸ’– the actual block she's standing on
  • bp_sib_bh β€” buffer head of sibling node block πŸ¦‹ that's her sibling's block, keeping it in the family
  • bp_index β€” index of child node 🌸 which child we're pointing at, an int, very demure
  • bp_oldreq β€” ptr end request for old ptr πŸ‘‘ the wrap-up request for the old pointer (a union nilfs_bmap_ptr_req)
  • bp_newreq β€” ptr alloc request for new ptr ⭐ the alloc request for the new pointer (also a union nilfs_bmap_ptr_req)
  • bp_ctxt β€” context information for changing the key of a b-tree node block πŸ”₯ it's giving "hold my metadata", it's a struct nilfs_btnode_chkey_ctxt
  • bp_op β€” rebalance operation πŸ’… a function pointer, signature void (*)(struct nilfs_bmap *, struct nilfs_btree_path *, int, __u64 *, __u64 *) β€” yes she takes all of that, and yes she ate
ngl the function pointer in the synopsis wraps onto a second line with __u64 *, __u64 *); and an extra space before the closing brace β€” that's just how it's printed, don't come for me πŸ™ˆ

🌈 SEE ALSO 🌈

  • Kernel file ./fs/nilfs2/btree.h β€” go read her, she's iconic, iykyk πŸ“–

okay that's the whole page, mwah πŸ’‹ this cutie pie comes from ./fs/nilfs2, dated October 2026, and lives in the Kernel API Manual β€” go forth and traverse responsibly bestie πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from