increment_for_data(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ increment_for_data β€” Kernel API Manual, section 9 πŸŽ€

okay so bestie, welcome to increment_for_data(9), straight out of the Linux kernel API manual. this one lives in the kernel, it's a section 9 page, and it's literally the girl whose whole job is bumping a reference count on a data block. tiny job, big main character energy. πŸ’…


✨ NAME ✨

increment_for_data β€” Increment the reference count for a data block. that's it, that's the whole gig. 🫢


🌸 SYNOPSIS 🌸

int increment_for_data (struct vdo_slab *slab , struct reference_block
*block , slab_block_number block_number , enum reference_status
old_status , struct pbn_lock *lock , vdo_refcount_t *counter_ptr , bool
adjust_block_count );

like, look at all those parameters. seven of them. she's highkey doing the most and honestly? slay. πŸ¦‹


πŸ’– ARGUMENTS πŸ’–

every single one, no skipping, periodt:

  • slab β€” The slab which owns the block. it's giving "this is my block, my slab, my rules" energy πŸ‘‘
  • block β€” The reference block which contains the block being updated. the block inside a block situation, very inception of her 🌈
  • block_number β€” The block to update. which block? this block. simple as that ✨
  • old_status β€” The reference status of the data block before this increment. like a before pic but for a refcount πŸ“Έ
  • lock β€” The pbn_lock associated with this increment (may be NULL). yes bestie, she can be NULL, that's literally in the docs πŸ™ˆ
  • counter_ptr β€” A pointer to the count for the data block (in, out). in and out, she reads it, she writes it, she does both πŸ’€
  • adjust_block_count β€” Whether to update the allocator's free block count. true? go off, update the allocator. false? then don't, i guess 🫢

⭐ RETURN ⭐

VDO_SUCCESS or an error. that's the whole return story. either we're blessed or we're in the error timeline, no in-between πŸ’œ


🧚 SEE ALSO 🧚

okay bestie, sit down, because the SEE ALSO section is literally a whole friend group and she knows every single one of them. Kernel file ./drivers/md/dm-vdo/slab-depot.c, plus:

like, that's the entire dm-vdo squad right there. iykyk πŸ’…


real talk though β€” every single one of those is a real page, so if you're lost in the slab depot, this list is basically your group chat. use it. πŸ“

and that's the page, bestie!! this one shipped from ./drivers/md/dm-vdo and it's dated October 2026 β€” so yeah, mark your calendar, screenshot it, put it on your fridge, whatever. mwah πŸ’‹βœ¨πŸŽ€

πŸ“¦ where this page comes from