vdo_claim_pb...ck_increment(9)
π 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:
vdo_is_pbn_read_lock(9)vdo_downgrade_pbn_write_lock(9)vdo_assign_pbn_lock_provisional_reference(9)vdo_unassign_pbn_lock_provisional_reference(9)release_pbn_lock_provisional_reference(9)union idle_pbn_lock(9)struct pbn_lock_pool(9)return_pbn_lock_to_pool(9)make_pbn_lock_pool(9)free_pbn_lock_pool(9)borrow_pbn_lock_from_pool(9)initialize_zone(9)vdo_make_physical_zones(9)vdo_free_physical_zones(9)vdo_get_physical_zone_pbn_lock(9)vdo_attempt_physical_zone_pbn_lock(9)allocate_and_lock_block(9)retry_allocation(9)continue_allocating(9)vdo_allocate_block_in_zone(9)vdo_release_physical_zone_pbn_lock(9)vdo_dump_physical_zone(9)
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
- 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