qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH 06/13] block: Drain invidual nodes during reopen


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH 06/13] block: Drain invidual nodes during reopen
Date: Wed, 9 Nov 2022 19:00:06 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

In subject: individual

On 11/8/22 15:37, Kevin Wolf wrote:
bdrv_reopen() and friends use subtree drains as a lazy way of covering
all the nodes they touch. Turns out that this lazy way is a lot more
complicated than just draining the nodes individually, even not
accounting for the additional complexity in the drain mechanism itself.

Simplify the code by switching to draining the individual nodes that are
already managed in the BlockReopenQueue anyway.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
  block.c             | 11 ++++-------
  block/replication.c |  6 ------
  blockdev.c          | 13 -------------
  3 files changed, 4 insertions(+), 26 deletions(-)


[..]

      bdrv_reopen_queue_free(queue);
-    for (p = drained; p; p = p->next) {
-        BlockDriverState *bs = p->data;
-        AioContext *ctx = bdrv_get_aio_context(bs);
-
-        aio_context_acquire(ctx);

In bdrv_reopen_queue_free() we don't have this acquire()/release() pair around 
bdrv_drained_end(). We don't need it anymore?

-        bdrv_subtree_drained_end(bs);
-        aio_context_release(ctx);
-    }
-    g_slist_free(drained);
  }
void qmp_blockdev_del(const char *node_name, Error **errp)

--
Best regards,
Vladimir




reply via email to

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