Received: from eggs.gnu.org ([2001:4830:134:3::10]:42860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0Vof-0005AB-5j for qemu-devel@nongnu.org; Thu, 04 Jun 2015 10:08:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0Voe-00046p-Cv for qemu-devel@nongnu.org; Thu, 04 Jun 2015 10:08:17 -0400 From: Alberto Garcia In-Reply-To: <1433360659-1915-9-git-send-email-mreitz@redhat.com> References: <1433360659-1915-1-git-send-email-mreitz@redhat.com> <1433360659-1915-9-git-send-email-mreitz@redhat.com> Date: Thu, 04 Jun 2015 16:07:26 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v3 08/38] block: Invoke change media CB before NULLing drv List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, Stefan Hajnoczi , Markus Armbruster On Wed 03 Jun 2015 09:43:49 PM CEST, Max Reitz wrote: > In order to handle host device passthrough, some guest device models > may call blk_is_inserted() to check whether the medium is inserted on > the host, when checking the guest tray status. > > This tray status is inquired by blk_dev_change_media_cb(); because > bdrv_is_inserted() (invoked by blk_is_inserted()) always returns 0 for > BDS with drv set to NULL, blk_dev_change_media_cb() should therefore be > called before drv is set to NULL. > > Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Berto