Commit 2da67725 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Remember to sleep and terminate, rather than loop for ever on a zero

VSL record.  Still not quite sure how they happen, but we shouldn't hang
no matter what.
parent f98e2b83
......@@ -175,6 +175,8 @@ vsl_nextlog(struct vsl *vsl, uint32_t **pp)
if (t == 0) {
/* Zero-initialized VSL */
w += SLEEP_USEC;
assert(usleep(SLEEP_USEC) == 0 || errno == EINTR);
VRMB();
continue;
}
......@@ -197,6 +199,7 @@ vsl_nextlog(struct vsl *vsl, uint32_t **pp)
return (-1);
w += SLEEP_USEC;
assert(usleep(SLEEP_USEC) == 0 || errno == EINTR);
VRMB();
continue;
}
if (vsl->log_ptr == vsl->log_start + 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment