Received: from eggs.gnu.org ([2001:4830:134:3::10]:51358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aquA1-0008Sr-Od for qemu-devel@nongnu.org; Thu, 14 Apr 2016 23:11:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aquA0-0006oM-VI for qemu-devel@nongnu.org; Thu, 14 Apr 2016 23:11:09 -0400 From: Fam Zheng Date: Fri, 15 Apr 2016 11:11:06 +0800 Message-Id: <1460689866-31020-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH] block: Inactivate all nodes at migration source List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Max Reitz , qemu-block@nongnu.org qcow2 is not necessarily the top layer node. Since bdrv_inactivate() doesn't recurse, we should ensure all block nodes are inactivated. Signed-off-by: Fam Zheng --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index d4939b4..1c575e4 100644 --- a/block.c +++ b/block.c @@ -3270,7 +3270,7 @@ int bdrv_inactivate_all(void) BlockDriverState *bs = NULL; int ret; - while ((bs = bdrv_next(bs)) != NULL) { + while ((bs = bdrv_next_node(bs)) != NULL) { AioContext *aio_context = bdrv_get_aio_context(bs); aio_context_acquire(aio_context); -- 2.8.0