29/05/2026 17:26, Anatoly Burakov:
> Use a numeric request ID for alarm callback lookup so stale callbacks
> from rolled-back requests become harmless no-ops.
[...]
> +static struct pending_request *
> +find_pending_request_by_id(unsigned long id)
> +{
> +     struct pending_request *r;
> +
> +     TAILQ_FOREACH(r, &pending_requests.requests, next) {
> +             if (r->id == id)
> +                     return r;
> +     }
> +
> +     return NULL;
> +}

This function is supposed to find only async requests?
What will happen if id wraparound and becomes 0,
matching sync requests?

I feel we should filter with r->type == REQUEST_TYPE_ASYNC


Reply via email to