update_mapping(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay so bestie, welcome to update_mapping(9) from the Kernel API Manual ✨. This function is literally here to find and update any existing mapping for a given key, and it returns the value associated with the key in the pointer you provide. Iconic. πŸ’…

✨ SYNOPSIS ✨

bool update_mapping (struct bucket *neighborhood , u64 key , void
       *new_value , bool update , void **old_value_ptr );

πŸŽ€ ARGUMENTS πŸŽ€

Here's the cast, no cap:

  • neighborhood β€” the first bucket in the neighborhood that would contain the search key. That's the whole vibe for this one.
  • key β€” the key you're associating the new value with.
  • new_value β€” the value to be associated with the key.
  • update β€” whether to overwrite an existing value. Yes, that's the question this one answers, periodt.
  • old_value_ptr β€” a pointer in which to store the old value (unmodified if no mapping was found). Important: it stays unmodified if no mapping was found.

🌸 RETURN 🌸

It returns true if the map contains a mapping for the key, and false if it does not. That's the vibe check: true = mapping exists, false = it does not. 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

Go stalk these next, bestie:


mwah πŸ’‹ β€” source/version: ./drivers/md/dm-vdo, dated October 2026, and this cutie is update_mapping(9). πŸŽ€

πŸ“¦ where this page comes from