From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52831) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoZNV-0006gN-T2 for qemu-devel@nongnu.org; Mon, 17 Jun 2013 09:21:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UoZNR-0003df-6z for qemu-devel@nongnu.org; Mon, 17 Jun 2013 09:21:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UoZNQ-0003cv-W5 for qemu-devel@nongnu.org; Mon, 17 Jun 2013 09:21:45 -0400 From: Pavel Hrdina Date: Mon, 17 Jun 2013 15:21:39 +0200 Message-Id: Subject: [Qemu-devel] [PATCH v3 0/2] block: fix spurious DEVICE_TRAY_MOVED events on shutdown List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@gmail.com, phrdina@redhat.com, lcapitulino@redhat.com 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. * changes from v1: - used the first patch from Luiz's series * changes from v2: - added comment that the error QERR_DEVICE_NOT_ENCRYPTED is used as warning 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 | 7 +++++++ include/block/block.h | 1 + 3 files changed, 9 insertions(+), 10 deletions(-) -- 1.8.1.4