34 static void copy_from_cb(
void *
dst,
const void *base,
unsigned offset,
35 unsigned len,
unsigned limit)
39 if ((copy + offset) > limit)
41 memcpy(dst, base + offset, copy);
44 memcpy(dst + copy, base, len);
59 unsigned offset,
unsigned len,
unsigned limit)
78 copy_from_cb(p, base, offset,
sizeof(
struct dlm_header),
82 lockspace = p->
header.h_lockspace;
91 if (msglen <
sizeof(
struct dlm_rcom))
96 log_print(
"message size %d from %d too big, buf len %d",
114 if (msglen >
sizeof(__tmp) && p == &__tmp.p) {
120 copy_from_cb(p, base, offset, msglen, limit);
126 offset &= (limit - 1);
135 return err ? err :
ret;