On Thu 18 Jan 2018 06:49:02 PM CET, Anton Nefedov wrote:

> -static bool coroutine_fn wait_serialising_requests(BdrvTrackedRequest *self)
> +static bool coroutine_fn wait_serialising_requests(BdrvTrackedRequest *self,
> +                                                   bool nowait)

It's a bit confusing to have a function called wait_foo() with a
parameter that says "don't wait"...

How about

     check_serialising_requests(BdrvTrackedRequest *self, bool wait)

> -    waited = wait_serialising_requests(req);
> +    waited = wait_serialising_requests(req, flags & BDRV_REQ_ALLOCATE);
> +    if (waited && flags & BDRV_REQ_ALLOCATE) {
> +        return -EAGAIN;
> +    }

I find this more readable (even if not strictly necessary):

       if (waited && (flags & BDRV_REQ_ALLOCATE)) {

None of my two comments are blockers, though, so

Reviewed-by: Alberto Garcia <be...@igalia.com>

Berto

Reply via email to