move_empty_bucket(9)
π move_empty_bucket(9) β the Kernel API Manual, but make it cute
okay bestie, so this is a page from the Kernel API Manual β move_empty_bucket(9) β and honestly? it's giving "tiny function, big job." let's get into it π
β¨ NAME β¨
move_empty_bucket β literally just moves an empty bucket closer to the start of the bucket array. that's it. that's the whole vibe. πΈ
π¦ SYNOPSIS π¦
struct bucket * move_empty_bucket (struct bucket *hole );
copy it exactly bestie, spacing and all, no cap π
π ARGUMENTS π
holeβ the empty bucket that we wanna fill up with an entry that precedes it in one of its enclosing neighborhoods π that's the whole assignment. she's empty, she's waiting, she's the main character.
π DESCRIPTION π
so here's the tea: this function searches the neighborhoods that contain the empty bucket, looking for a non-empty bucket that sits closer to the start of the array. πβ¨
if such a bucket is found, this swaps the two buckets by moving the entry into the empty bucket. lowkey elegant, highkey iconic. π«Ά
β RETURN β
it returns the bucket that was vacated by moving its entry to the provided hole π
or NULL if no entry could be moved. that's it, that's the answer, no notes. π
ok so quick vibe check: no entry moved = NULL back atcha. don't come for her, she told you upfront. π
π SEE ALSO π
- Kernel file
./drivers/md/dm-vdo/int-map.c 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)find_empty_bucket(9)update_mapping(9)find_or_make_vacancy(9)vdo_int_map_put(9)vdo_int_map_remove(9)
like, the whole friend group showed up for this one ππ go read them too, iykyk.
and that's the page!! πβ¨ this little icon lives in ./drivers/md/dm-vdo and the version/date on the tin says October 2026 β so go forth, move those empty buckets, and slay ππ¦π periodt.
π¦ 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