increment_for_data(9)
π 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β Thepbn_lockassociated with this increment (may beNULL). yes bestie, she can beNULL, 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:
get_lock(9)must_make_entries_to_flush(9)is_reaping(9)initialize_tail_block(9)initialize_journal_state(9)block_is_full(9)is_slab_journal_blank(9)mark_slab_journal_dirty(9)compute_fullness_hint(9)check_summary_drain_complete(9)notify_summary_waiters(9)finish_updating_slab_summary_block(9)finish_update(9)handle_write_error(9)launch_write(9)update_slab_summary_entry(9)finish_reaping(9)complete_reaping(9)handle_flush_error(9)flush_for_reaping(9)reap_slab_journal(9)adjust_slab_journal_block_reference(9)release_journal_locks(9)update_tail_block_location(9)reopen_slab_journal(9)complete_write(9)write_slab_journal_block(9)commit_tail(9)encode_slab_journal_entry(9)expand_journal_point(9)add_entry(9)vdo_attempt_replay_into_slab(9)requires_reaping(9)launch_reference_block_write(9)finish_reference_block_write(9)get_reference_counters_for_block(9)pack_reference_block(9)handle_io_error(9)write_reference_block(9)reference_count_to_status(9)dirty_block(9)get_reference_block(9)slab_block_number_from_pbn(9)get_reference_counter(9)adjust_free_block_count(9)decrement_for_data(9)increment_for_block_map(9)update_reference_count(9)add_entry_from_waiter(9)is_next_entry_a_block_map_increment(9)add_entries(9)reset_search_cursor(9)advance_search_cursor(9)vdo_adjust_reference_count_for_rebuild(9)replay_reference_count_change(9)find_zero_byte_in_word(9)find_free_block(9)search_current_reference_block(9)search_reference_blocks(9)make_provisional_reference(9)dirty_all_reference_blocks(9)match_bytes(9)count_valid_references(9)unpack_reference_block(9)finish_reference_block_load(9)load_reference_block_group(9)load_reference_blocks(9)drain_slab(9)read_slab_journal_tail(9)load_slab_journal(9)get_next_slab(9)has_slabs_to_scrub(9)uninitialize_scrubber_vio(9)finish_scrubbing(9)slab_scrubbed(9)abort_scrubbing(9)handle_scrubber_error(9)apply_block_entries(9)apply_journal_entries(9)start_scrubbing(9)scrub_next_slab(9)scrub_slabs(9)get_depot_slab_iterator(9)next_slab(9)abort_waiter(9)vdo_acquire_provisional_reference(9)open_slab(9)vdo_enqueue_clean_slab_waiter(9)vdo_modify_reference_count(9)vdo_notify_slab_journals_are_recovered(9)make_slab(9)allocate_slabs(9)vdo_abandon_new_slabs(9)release_recovery_journal_lock(9)prepare_for_tail_block_commit(9)schedule_tail_block_commit(9)initialize_slab_scrubber(9)initialize_slab_summary_block(9)vdo_decode_slab_depot(9)vdo_free_slab_depot(9)vdo_record_slab_depot(9)vdo_allocate_reference_counters(9)get_slab_number(9)vdo_get_slab(9)vdo_get_increment_limit(9)vdo_is_physical_data_block(9)vdo_get_slab_depot_allocated_blocks(9)vdo_get_slab_depot_data_blocks(9)finish_combining_zones(9)combine_summaries(9)finish_loading_summary(9)load_slab_summary(9)vdo_load_slab_depot(9)vdo_prepare_slab_depot_to_allocate(9)vdo_update_slab_depot_size(9)vdo_prepare_to_grow_slab_depot(9)finish_registration(9)vdo_use_new_slabs(9)stop_scrubbing(9)vdo_drain_slab_depot(9)resume_scrubbing(9)vdo_resume_slab_depot(9)vdo_commit_oldest_slab_journal_tail_blocks(9)vdo_scrub_all_unrecovered_slabs(9)get_block_allocator_statistics(9)get_ref_counts_statistics(9)get_slab_journal_statistics(9)vdo_get_slab_depot_statistics(9)vdo_dump_slab_depot(9)
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
- 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