[Top][All Lists]

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

Re: [RFC PATCH v2 3/4] block: Support multiple reopening with x-blockdev

From: Alberto Garcia
Subject: Re: [RFC PATCH v2 3/4] block: Support multiple reopening with x-blockdev-reopen
Date: Tue, 16 Feb 2021 17:33:22 +0100
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Tue 09 Feb 2021 09:03:02 AM CET, Vladimir Sementsov-Ogievskiy wrote:
>>   { 'command': 'x-blockdev-reopen',
>> -  'data': 'BlockdevOptions', 'boxed': true }
>> +  'data': { 'options': ['BlockdevOptions'] } }
> Do we also want to drop x- prefix?

I think we can drop it once it's clear the the API is fine. It can be on
a separate patch after this.

>> -    visit_free(v);
>> +    bdrv_reopen_queue_free(queue);
>> +    g_slist_free_full(drained, (GDestroyNotify) bdrv_subtree_drained_end);
>> +    g_slist_free_full(aio_ctxs, (GDestroyNotify) aio_context_release);
>> +    g_slist_free_full(visitors, (GDestroyNotify) visit_free);
> Probably you can use g_autoslist() for defining these lists to get
> automatic cleanup.

g_autoslist() requires that the type has a cleanup function, but that's
not the case here and I don't think we can add one ('drained' contains a
BlockDriverState, what's the cleanup function? bdrv_subtree_drained_end
or bdrv_unref?)

I think it's fine to call g_slist_free_full() explicitly in this case.


reply via email to

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