nilfs_btnode...t_change_key(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nilfs_btnode_commit_change_key(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” yes, the whole Kernel API Manual, and today's main character is nilfs_btnode_commit_change_key. she's the finisher, the closer, the one who actually does the thing after everyone else has done the prep πŸŽ€


🌸 NAME 🌸

nilfs_btnode_commit_change_key β€” commit the change of the search key of a b-tree node block ✨

like literally, she takes that search-key glow-up you planned and makes it official.


πŸ¦‹ SYNOPSIS πŸ¦‹

void nilfs_btnode_commit_change_key (struct address_space *btnc , struct
nilfs_btnode_chkey_ctxt *ctxt );

no cap, that's the whole signature. two args, zero drama (well, some drama, see below πŸ‘€).


πŸŽ€ ARGUMENTS πŸŽ€

  • btnc β€” the page cache in which the b-tree node block is buffered πŸ’– this is where the block lives, her little home.
  • ctxt β€” the structure for exchanging context information for key change 🫢 it's the group chat where all the key-change tea gets passed around.

✨ DESCRIPTION ✨

so nilfs_btnode_commit_change_key executes the key change based on the context ctxt prepared by nilfs_btnode_prepare_change_key. she's not out here freelancing β€” she's following the plan someone else already made. iconic teamwork honestly πŸ’…

and then it branches, and honestly both branches ate:

  • if no valid block buffer is prepared in "newbh" of ctxt (i.e., a full folio move β€” big move energy πŸ¦‹), this function removes the folio from the old index and completes the move.
  • otherwise, it copies the block data and inherited flag states of "oldbh" to "newbh" and clears the "oldbh" from the cache. out with the old, in with the new, periodt πŸ”₯

in either case, the relocated buffer is marked as dirty 😈 yes ma'am, she's dirty now, that's just how it is.

⚠️ and as with nilfs_btnode_prepare_change_key, the current implementation does not support folio sizes larger than the page size. so bestie, keep your folios page-sized or smaller, fr fr. no cap, that's a real limitation, not me being dramatic πŸ’€

🌈 SEE ALSO 🌈

the whole friend group honestly β€” go say hi to all of them πŸ’œ


and that's the page!! mwah πŸ“ this lil' entry lives in ./fs/nilfs2, dated October 2026, and if you see nilfs_btnode...t_change_key(9) floating around somewhere, that's just her nickname because the header was too long to fit. slay πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from