Minor suggestion, names I'd prefer are:
{'data': 4,
'event': 3,
'src_generation': 13,
'src_host_id': 3,
'dst_generation': 22,
'dst_host_id': 0}
src/dst are nice and clear when displayed together, but the values are not
adjacent in the API, so I don't see a big enough advantage to use prefixes
there.
struct sanlk_host_event {
uint64_t host_id;
uint64_t generation;
uint64_t event;
uint64_t data;
};
int sanlock_set_event(const char *ls_name, struct sanlk_host_event *he,
uint32_t flags);
int sanlock_get_event(int fd, uint32_t flags, struct sanlk_host_event *he,
uint64_t *from_host_id, uint64_t *from_generation);