All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alberto Garcia <berto@igalia.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [RFC PATCH v2 3/4] block: Support multiple reopening with x-blockdev-reopen
Date: Tue, 16 Feb 2021 17:33:22 +0100	[thread overview]
Message-ID: <w517dn82crx.fsf@maestria.local.igalia.com> (raw)
In-Reply-To: <06587add-3242-6041-6a76-e2fd41e8c040@virtuozzo.com>

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.

Berto


  reply	other threads:[~2021-02-16 16:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08 18:44 [RFC PATCH v2 0/4] Allow changing bs->file on reopen Alberto Garcia
2021-02-08 18:44 ` [RFC PATCH v2 1/4] block: " Alberto Garcia
2021-02-09  7:37   ` Vladimir Sementsov-Ogievskiy
2021-02-10 16:52   ` Kevin Wolf
2021-02-16 12:06     ` Alberto Garcia
2021-02-08 18:44 ` [RFC PATCH v2 2/4] iotests: Update 245 to support replacing files with x-blockdev-reopen Alberto Garcia
2021-02-10 17:17   ` Kevin Wolf
2021-02-08 18:44 ` [RFC PATCH v2 3/4] block: Support multiple reopening " Alberto Garcia
2021-02-09  8:03   ` Vladimir Sementsov-Ogievskiy
2021-02-16 16:33     ` Alberto Garcia [this message]
2021-02-24 12:33     ` Kevin Wolf
2021-02-25 17:02       ` Vladimir Sementsov-Ogievskiy
2021-03-01 11:07         ` Kevin Wolf
2021-03-01 11:57           ` Vladimir Sementsov-Ogievskiy
2021-03-01 12:21           ` Peter Krempa
2021-02-26 11:51       ` Alberto Garcia
2021-02-08 18:44 ` [RFC PATCH v2 4/4] iotests: Test reopening multiple devices at the same time Alberto Garcia
2021-02-09  7:15 ` [RFC PATCH v2 0/4] Allow changing bs->file on reopen Vladimir Sementsov-Ogievskiy
2021-02-10 17:26 ` Kevin Wolf
2021-02-12 14:41   ` Peter Krempa
2021-02-16 16:36   ` Alberto Garcia
2021-02-16 16:48     ` Kevin Wolf
2021-02-16 17:25       ` Alberto Garcia
2021-02-16 17:51         ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=w517dn82crx.fsf@maestria.local.igalia.com \
    --to=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.