[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 10/16] qcow2: Delay the COW
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [RFC PATCH 10/16] qcow2: Delay the COW |
Date: |
Tue, 18 Sep 2012 16:49:52 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
Am 18.09.2012 16:27, schrieb Paolo Bonzini:
> 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?
I think you're right, thanks.
Kevin