vdo_claim_pb...ck_increment(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vdo_claim_pb...ck_increment(9)

okay so real talk, this is a page straight out of the Kernel API Manual and it's genuinely so niche and so specific and I'm obsessed πŸŽ€ like it's one tiny function doing one tiny job in dm-vdo and honestly? iconic.


✨ NAME ✨

vdo_claim_pbn_lock_increment β€” bestie, this is the one that tries to claim one of the available reference count increments on a read lock. that's it, that's the whole vibe πŸ¦‹


🌸 SYNOPSIS 🌸

bool vdo_claim_pbn_lock_increment (struct pbn_lock *lock );

🫢 ARGUMENTS 🫢

  • lock β€” the PBN read lock you're trying to claim an increment from. that's your girl, that's the one πŸ’œ

πŸ’– DESCRIPTION πŸ’–

so here's the tea: claims can be attempted from any thread. any thread!! no cap 🧚

but β€” and this is the important part, do not skip this β€” a claim is only valid until the PBN lock is released. after that it's giving expired, it's giving stale, it's giving nothing 😭 so like, use it while you've got it, yk?


πŸ”₯ RETURN πŸ”₯

true if the claim succeeded β€” which guarantees that one increment can be made without overflowing the PBN's reference count. slay, no overflow, we love a safe increment ✨

ngl there is no "false" description here, the page only documents the true case. i'm not making stuff up, i'm just the messenger πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/md/dm-vdo/physical-zone.c, plus the whole friend group:


and that's the whole page bestie, mwah πŸ’‹ this one lives in ./drivers/md/dm-vdo and it's dated October 2026 β€” go read the source, it ate fr fr πŸ“πŸ’…

πŸ“¦ where this page comes from