Expose fork ownership errors in file debug traces

This commit is contained in:
evgeny committed 2026-10-05 21:43:44 +02:00
1 parent c259a7330b
commit 977748b16c
3 files changed
+5 -1

No files matched your search

+3
View File
@@ -102,6 +102,9 @@ void mf_worker_unreserve(struct mf_work* j) { if (j) { u_free(j->completion); u_
void mf_worker_submit_reserved(struct mf_worker* w, struct mf_work* j,
mf_work_fn work, void* data, mf_done_fn done, void* arg) {
if (w->creator_pid != (long)getpid()) DEBUG_ERROR(DEBUG_CATEGORY_DEBUG,
"member_files: worker inherited after fork creator_pid=%ld current_pid=%ld; disk thread is missing",
w->creator_pid, (long)getpid());
j->owner = w; j->work = work; j->data = data; j->done = done; j->arg = arg;
j->next = w->jobs; w->jobs = j; w->count++;
DEBUG_TRACE(DEBUG_CATEGORY_DEBUG, "member_files: worker queued owner=%p task=%p current_pid=%ld creator_pid=%ld active=%u",