STRUCT NILFS_BTREE_PATH(9)
π 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 onbp_sib_bhβ buffer head of sibling node block π¦ that's her sibling's block, keeping it in the familybp_indexβ index of child node πΈ which child we're pointing at, anint, very demurebp_oldreqβ ptr end request for old ptr π the wrap-up request for the old pointer (aunion nilfs_bmap_ptr_req)bp_newreqβ ptr alloc request for new ptr β the alloc request for the new pointer (also aunion 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 astruct nilfs_btnode_chkey_ctxtbp_opβ rebalance operation π a function pointer, signaturevoid (*)(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
- 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