find_zero_byte_in_word(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

hey bestie, welcome to find_zero_byte_in_word(9) from the Kernel API Manual β€” this one is literally about finding the array index of the first zero byte in a word-sized range of reference counters. lowkey iconic πŸ’…

✨ SYNOPSIS ✨

slab_block_number find_zero_byte_in_word (const u8 *word_ptr ,
slab_block_number start_index , slab_block_number fail_index );

πŸŽ€ ARGUMENTS πŸŽ€

  • word_ptr β€” a pointer to the eight counter bytes to check, periodt.
  • start_index β€” the array index that corresponds to word_ptr[0].
  • fail_index β€” the array index to return if no zero byte is found. your fallback bestie 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so real talk: the search does no bounds checking. none. zero. the function relies on the array being sufficiently padded β€” that's the whole safety situation, bestie 🚨

🌸 RETURN 🌸

it returns the array index of the first zero byte in the word, or the value passed as fail_index if no zero byte was found. that's it, that's the return πŸ’–

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/md/dm-vdo/slab-depot.c is the home base for all this. the whole squad is:


πŸ’Œ okay that's the page! this one is from ./drivers/md/dm-vdo, dated October 2026, and it's chillin' in the Kernel API Manual as find_zero_byte_in_word(9). mwah πŸ’‹

πŸ“¦ where this page comes from