find_empty_bucket(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ find_empty_bucket(9) πŸ¦‹

okay bestie, this is the find_empty_bucket(9) page from the Kernel API Manual, and it's giving tiny kernel search mission energy. πŸ’…

🌸 NAME 🌸

find_empty_bucket β€” probe the bucket array starting at the given bucket for the next empty bucket, returning a pointer to it. That's the whole assignment. ✨

✨ SYNOPSIS ✨

struct bucket * find_empty_bucket (struct int_map *map , struct bucket *bucket , unsigned int max_probes );

πŸŽ€ ARGUMENTS πŸŽ€

  • map β€” the map containing the buckets to search. πŸ—ΊοΈ
  • bucket β€” the bucket where the probing starts. πŸ‘€
  • max_probes β€” the maximum number of buckets to search. 🚦

πŸ’… DESCRIPTION πŸ’…

So here's the tea: NULL will be returned if the search reaches the end of the bucket array, or if the number of linear probes exceeds a specified limit. No cap, that's the boundary check. 😭

🫢 RETURN 🫢

You get the next empty bucket if it finds one, or NULL if the search failed. Simple, iconic, done. πŸ’–

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/md/dm-vdo/int-map.c β€” plus the whole friend group: Introduction(9), struct bucket(9), struct int_map(9), mix(9), hash_key(9), allocate_buckets(9), vdo_int_map_create(9), vdo_int_map_free(9), vdo_int_map_size(9), dereference_hop(9), insert_in_hop_list(9), select_bucket(9), search_hop_list(9), vdo_int_map_get(9), resize_buckets(9), move_empty_bucket(9), update_mapping(9), find_or_make_vacancy(9), vdo_int_map_put(9), vdo_int_map_remove(9). iykyk, go read them if you need the lore. 🌈

xoxo, your find_empty_bucket(9) bestie πŸ’– β€” source/version ./drivers/md/dm-vdo, dated October 2026. Bye bestie! 🫢

πŸ“¦ where this page comes from