vdo_compute_slab_count(9)
π vdo_compute_slab_count(9) β like, the Kernel API Manual era π
okay so bestie, welcome to vdo_compute_slab_count from the Kernel API Manual, and honestly? this one is a little math gremlin and I'm obsessed π§β¨
β¨ NAME β¨
vdo_compute_slab_count β literally computes the number of slabs that a depot would have, given its parameters. that's it. that's the whole vibe check π
πΈ SYNOPSIS πΈ
slab_count_t vdo_compute_slab_count (physical_block_number_t first_block
, physical_block_number_t last_block , unsigned int slab_size_shift );
look at her go π no cap, that's the entire signature, copy it exactly, don't @ me.
π¦ ARGUMENTS π¦
first_blockβ the PBN of the first data block. like, where the data party starts πlast_blockβ the PBN of the last data block. where it wraps up, periodt πslab_size_shiftβ the exponent for the number of blocks per slab. it's giving "shift me, I'm a power of two" π
ngl if you're wondering what PBN means, it's physical block number, and yes you should absolutely treat these as exact values, not vibes π
π RETURN π
returns the number of slabs. that's the answer, main character energy, no extra lore needed β¨
π«Ά SEE ALSO π«Ά
okay this is the part where the group chat gets LONG, but every single one of these is invited to the party, so:
- the Kernel file
./drivers/md/dm-vdo/encodings.h, and alsoBlock map entries(9)πΊοΈ vdo_are_same_version(9)vdo_pack_version_number(9)vdo_unpack_version_number(9)vdo_pack_header(9)vdo_unpack_header(9)vdo_get_index_region_start(9)vdo_get_data_region_start(9)vdo_get_index_region_size(9)vdo_pack_recovery_journal_entry(9)vdo_unpack_recovery_journal_entry(9)vdo_is_valid_recovery_journal_sector(9)vdo_compute_recovery_journal_block_number(9)vdo_get_journal_block_sector(9)vdo_pack_recovery_block_header(9)vdo_unpack_recovery_block_header(9)vdo_get_saved_reference_count_size(9)vdo_get_slab_journal_start_block(9)vdo_advance_journal_point(9)vdo_before_journal_point(9)vdo_pack_journal_point(9)vdo_unpack_journal_point(9)vdo_pack_slab_journal_block_header(9)vdo_unpack_slab_journal_block_header(9)vdo_pack_slab_journal_entry(9)vdo_unpack_slab_journal_entry(9)vdo_get_slab_summary_hint_shift(9)
like I said. the whole friend group. iykyk π
and that's the page, bestie β brought to you by the fine people at ./drivers/md/dm-vdo, dated October 2026, filed under vdo_compute_slab_count(9) in the Kernel API Manual. slay, go count some slabs, you got this πππ₯
π¦ 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