search_curre...erence_block(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 search_current_reference_block(9) β€” Kernel API Manual ✨

okay so bestie, welcome to the Kernel API Manual, and today's main character is a little function called search_current_reference_block. it lives in the kernel file ./drivers/md/dm-vdo/slab-depot.c and honestly? it's giving "quietly doing the most important job in the room" energy. let's get into it πŸ’…


πŸŽ€ NAME πŸŽ€

search_current_reference_block β€” searches the reference block that's currently saved in the search cursor, looking for a reference count of zero, and it starts the hunt at the saved counter index. yeah. that's the whole vibe check. πŸ”


πŸ¦‹ SYNOPSIS πŸ¦‹

bool search_current_reference_block (const struct vdo_slab *slab ,
slab_block_number *free_index_ptr );

like, exactly that. no cap, copy it character for character if you're typing it out πŸ“


✨ ARGUMENTS ✨

  • slab β€” the slab you want to search. that's it, that's the whole argument description. she's lowkey mysterious πŸ”₯
  • free_index_ptr β€” a pointer that receives the array index of the zero reference count. so like, you hand her an address and she fills it in with where the unreferenced counter is. very "here's your answer bestie" of her 🫢

πŸ’– RETURN πŸ’–

Returns true if an unreferenced counter was found. periodt. πŸ’€


🌈 SEE ALSO 🌈

soooo the SEE ALSO section on this one is genuinely enormous β€” it's the whole group chat 😭. they all come from the kernel file ./drivers/md/dm-vdo/slab-depot.c, and here's every single one, no gatekeeping:

like I said. the whole group chat. open the ones you need and hydrate while you're at it πŸ’§


ngl, this page is short but she's specific. slab in, free_index_ptr out, true when the zero-count counter shows up. don't overthink her 🧚

and that's the tea, bestie πŸ“ β€” this one's from ./drivers/md/dm-vdo, dated October 2026, and it's the search_current_reference_block(9) page in the Kernel API Manual. go forth and find those unreferenced counters πŸ’œβœ¨

πŸ“¦ where this page comes from