nilfs_btnod...t_change_key(9)
π nilfs_btnode_abort_change_key(9) β the "jk, never mind" of key changes
okay so this is a page straight out of the Kernel API Manual, and it's about nilfs_btnode_abort_change_key β yes, the whole truncated header situation (nilfs_btnod...t_change_key(9)) is giving "my name got cut off in the group chat preview", but the full function name is right there in the NAME section, we move.
β¨ NAME β¨
nilfs_btnode_abort_change_key β bestie, it aborts the change of the search key of a b-tree node block. that's it. that's the whole vibe. it's the undo button π«Ά
πΈ SYNOPSIS πΈ
void nilfs_btnode_abort_change_key (struct address_space *btnc , struct
nilfs_btnode_chkey_ctxt *ctxt );
literally two arguments, returns nothing (void), zero drama π
π ARGUMENTS π
btncβ the page cache in which the b-tree node block is buffered. it's where the block lives, okay, it's the block's apartment πctxtβ the structure for exchanging context information for key change. think of it as the little messenger bag π that carries all the details about the key change around.
π¦ DESCRIPTION π¦
so nilfs_btnode_abort_change_key cancels the key change that's associated with the context ctxt β and that context is the one you got ready via nilfs_btnode_prepare_change_key. it also does any necessary cleanup, because we do NOT leave a mess behind, periodt β¨
here's the tea on how it actually behaves β:
- if there's no valid block buffer prepared in
"newbh"ofctxt, this function removes the folio from the destination index and aborts the move. like, it was never gonna work out, so we're removing it from the destination index and calling it π« - otherwise, it clears
"newbh"from the cache. simple. clean. slay π
β οΈ and just like its sibling nilfs_btnode_prepare_change_key, the current implementation does not support folio sizes larger than the page size. no cap, that's a real limitation, don't come for me, it's literally in the docs π
π SEE ALSO π
go touch some grass in the kernel source, these are all connected iykyk:
- Kernel file
./fs/nilfs2/btnode.c nilfs_init_btnc_inode(9)nilfs_btnode_delete(9)nilfs_btnode_prepare_change_key(9)nilfs_btnode_commit_change_key(9)
and that's the whole page bestie π this lil' gem lives in ./fs/nilfs2, it's dated October 2026, and it's filed under that iconic truncated name nilfs_btnod...t_change_key(9) in the Kernel API Manual β go forth and abort those key changes responsibly, 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