From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui5HD-0006Nx-Af for qemu-devel@nongnu.org; Thu, 30 May 2013 12:00:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ui595-0007xz-20 for qemu-devel@nongnu.org; Thu, 30 May 2013 11:52:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ui594-0007xu-QM for qemu-devel@nongnu.org; Thu, 30 May 2013 11:52:06 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4UFq6pp021722 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 30 May 2013 11:52:06 -0400 Date: Thu, 30 May 2013 11:51:47 -0400 From: Luiz Capitulino Message-ID: <20130530115147.41fbd947@redhat.com> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/2] block: fix spurious DEVICE_TRAY_MOVED events on shutdown List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Hrdina Cc: kwolf@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com On Wed, 29 May 2013 18:18:17 +0200 Pavel Hrdina wrote: > This fixes a regression introduced by commit 9ca111544. > > The first commit is done by Luiz and I've just use it as it is. > > The second commit moves the bdrv_dev_change_media_cb() into eject_device(), > called by QMP and HMP eject command, and into qmp_bdrv_open_encrypted(), > called by QMP and HMP change command. These are the only place where I think > that should call the bdrv_dev_change_media_cb() function. > > There is no reason to call this function while we are removing the device > from the guest, for example while closing and deleting all devices on shutdown. I'll defer review to the block guys, but as this works for me: Tested-by: Luiz Capitulino > > Luiz Capitulino (1): > block: make bdrv_dev_change_media_cb() public > > Pavel Hrdina (1): > block: move the bdrv_dev_change_media_cb() > > block.c | 11 +---------- > blockdev.c | 5 +++++ > include/block/block.h | 1 + > 3 files changed, 7 insertions(+), 10 deletions(-) >