vdo_get_slab(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vdo_get_slab β€” NAME

okay so <pink>vdo_get_slab</pink> is literally the little function that fetches you the slab object for the slab that contains a block you point at. that's it, that's the vibe πŸŽ€


✨ SYNOPSIS ✨

struct vdo_slab * vdo_get_slab (const struct slab_depot *depot ,
physical_block_number_t pbn );

like, you hand it a depot and a block number and it goes "say less, here's your slab" 🫢


🌸 ARGUMENTS 🌸

  • depot β€” the slab depot. yes. the depot. the whole depot. give it the depot 🏠
  • pbn β€” the physical block number. this is the block you're asking about πŸ”’

πŸ’– DESCRIPTION πŸ’–

so here's the tea, bestie: if the pbn you pass in is not a valid data block and it's not the zero block, this function will put the VDO into read-only mode 😭 like it's not a warning, it's not a suggestion, it just does it. so maybe double-check your block number before you commit, mkay? πŸ™ˆ


⭐ RETURN ⭐

it gives you back the slab containing the block β€” iconic, exactly what you asked for πŸ‘‘

but if the block number is the zero block or otherwise out of range, you get NULL. no slab for you. empty hands. πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹

there's a whole friend group here, and honestly they all live in the kernel file ./drivers/md/dm-vdo/slab-depot.c 🧚 so go say hi:


and that's the whole page, bestie. you ate. no cap. πŸ’œ

this lil masterpiece ships out of ./drivers/md/dm-vdo and is dated October 2026 β€” printed on the Kernel API Manual energy, vdo_get_slab(9) forever and ever, periodt. πŸŒˆβœ¨πŸ‘‘

πŸ“¦ where this page comes from