vdo_share_c...d_write_lock(9)
π vdo_share_compressed_write_lock(9) β Kernel API Manual β¨
okay so bestie, welcome to the Kernel API Manual π β this one's from the dm-vdo crew and it's literally the glow-up moment for a lock. buckle up π¦
πΈ NAME πΈ
vdo_share_compressed_write_lock β the function that takes a data_vio's hash lock and makes it a shared holder of the PBN lock on the compressed block its data just got written to. yes queen, it's upgrading the vibes from exclusive to shared π
β SYNOPSIS β
void vdo_share_compressed_write_lock (struct data_vio *data_vio , struct
pbn_lock *pbn_lock );
that's it, that's the whole signature, no cap π«Ά
π¦ ARGUMENTS π¦
data_vioβ thedata_viothat just got compressed. main character energy, honestly π§pbn_lockβ the PBN lock sitting on that compressed block. the other half of the duo π
π DESCRIPTION π
so here's the tea β β if the lock is still a write lock (and ngl, it will be, if this is the first share), it gets converted into a read lock. slay. β¨
this also reserves a reference count increment for the data_vio. so like, it's not just changing the lock type, it's also calling dibs on a refcount bump. periodt π
π₯ SEE ALSO π₯
the whole friend group, fr fr β go say hi to:
- Kernel file
./drivers/md/dm-vdo/dedupe.cIntroduction(9) return_hash_lock_to_pool(9)vdo_get_duplicate_lock(9)hash_lock_key(9)get_hash_lock_state_name(9)assert_hash_lock_agent(9)set_duplicate_lock(9)dequeue_lock_waiter(9)set_hash_lock(9)exit_hash_lock(9)set_duplicate_location(9)retire_lock_agent(9)wait_on_hash_lock(9)abort_waiter(9)start_bypassing(9)finish_unlocking(9)unlock_duplicate_pbn(9)start_unlocking(9)finish_updating(9)start_updating(9)finish_deduping(9)acquire_lock(9)enter_forked_lock(9)fork_hash_lock(9)launch_dedupe(9)start_deduping(9)increment_stat(9)finish_verifying(9)start_verifying(9)finish_locking(9)lock_duplicate_pbn(9)start_locking(9)finish_writing(9)select_writing_agent(9)start_writing(9)finish_querying(9)start_querying(9)report_bogus_lock_state(9)vdo_continue_hash_lock(9)is_hash_collision(9)vdo_acquire_hash_lock(9)vdo_release_hash_lock(9)transfer_allocation_lock(9)report_dedupe_timeouts(9)finish_index_operation(9)check_for_drain_complete(9)vdo_make_hash_zones(9)vdo_free_hash_zones(9)suspend_index(9)resume_index(9)vdo_resume_hash_zones(9)get_hash_zone_statistics(9)vdo_get_dedupe_statistics(9)vdo_select_hash_zone(9)dump_hash_lock(9)dump_hash_zone(9)vdo_dump_hash_zones(9)acquire_context(9)
like, the entire dedupe.c cast π go read them all, iykyk π
and that's the page, bestie π this lil icon lives in ./drivers/md/dm-vdo, dated October 2026, and the header gets truncated to vdo_share_c...d_write_lock(9) because even manpage titles deserve a little mystery π see u in the next one πβπ
π¦ 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