qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 10/16] qcow2: Delay the COW


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC PATCH 10/16] qcow2: Delay the COW
Date: Tue, 18 Sep 2012 16:27:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

Il 18/09/2012 13:40, Kevin Wolf ha scritto:
> +again:
> +    QLIST_FOREACH(m, &s->cluster_allocs, next_in_flight) {
> +        if (m->sleeping) {
> +            qemu_coroutine_enter(m->co, NULL);
> +            /* next_in_flight link could have become invalid */
> +            goto again;
> +        }
> +    }
> +
>      qemu_co_rwlock_wrlock(&s->l2meta_flush);
>  }
>  
>  static inline coroutine_fn void resume_l2meta(BDRVQcowState *s)
>  {
> +    s->in_l2meta_flush = false;
>      qemu_co_rwlock_unlock(&s->l2meta_flush);
>  }
>  
>  static bool qcow2_drain(BlockDriverState *bs)
>  {
>      BDRVQcowState *s = bs->opaque;
> +    QCowL2Meta *m;
> +
> +    QLIST_FOREACH(m, &s->cluster_allocs, next_in_flight) {
> +        if (m->sleeping) {
> +            qemu_coroutine_enter(m->co, NULL);
> +        }
> +    }
>  

Why are the goto and in_l2meta_flush not needed here?  If they are,
perhaps stop_l2meta can just use qcow2_drain?

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]