devlink_regi...pshot_id_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so this is a page from the Kernel API Manual and honestly the function name is so long it needs its own zip code, but we're gonna get through it together, i promise 🫢


✨ NAME ✨

devlink_region_snapshot_id_get β€” literally just: get a snapshot ID. that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

int devlink_region_snapshot_id_get (struct devlink *devlink , u32 *id );

like, that's it. that's the whole signature. slay. ✨


πŸ’– ARGUMENTS πŸ’–

  • devlink β€” a devlink. yeah bestie, the argument is literally just described as "devlink". iconic minimalism, no notes πŸ’€
  • id β€” the storage where the id gets returned. it's a u32 *, so hand her a pointer and she'll fill it in for you πŸŽ€

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea: this callback should be called whenever you're adding a new snapshot. and the driver β€” yes, the driver, your main character β€” should use the same id for multiple snapshots taken on multiple regions at the same time / by the same trigger. no cap, that's the whole point of the id. one trigger, one id, many regions. periodt. πŸ”₯

now, important part, don't skip this: the caller of this function must use devlink_region_snapshot_id_put when they're finished creating regions using this id. it's giving "borrow my charger, but give it back". if you don't put it back... bestie. 😭

and the return? returns zero on success, or a negative error code on failure. that's it. zero = good vibes, negative = something went sideways 🫢


🌈 SEE ALSO 🌈

okay this section is a whole friend group, get cozy:


πŸ’€ friendly reminder from your girl: every id you get needs a matching devlink_region_snapshot_id_put. this is not a drill, this is a lifestyle. πŸ’…

and that's the whole page, bestie!! this gem dropped in October 2026 and lives under the source path ./net/devlink β€” go forth, get those ids, and remember: zero on success, negative on failure, and always put back what you got πŸŒŸπŸ’œπŸŽ€

πŸ“¦ where this page comes from