Received: from eggs.gnu.org ([2001:4830:134:3::10]:35466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aL7NV-0001zl-8B for qemu-devel@nongnu.org; Mon, 18 Jan 2016 05:49:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aL7NR-000888-IX for qemu-devel@nongnu.org; Mon, 18 Jan 2016 05:49:41 -0500 From: Alberto Garcia In-Reply-To: <1452613674-12248-3-git-send-email-mreitz@redhat.com> References: <1452613674-12248-1-git-send-email-mreitz@redhat.com> <1452613674-12248-3-git-send-email-mreitz@redhat.com> Date: Mon, 18 Jan 2016 11:49:25 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 2/4] blockdev: Fix 'change' for slot devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , Peter Maydell , Markus Armbruster , qemu-stable , qemu-devel@nongnu.org On Tue 12 Jan 2016 04:47:52 PM CET, Max Reitz wrote: > 'change' and related operations did not work when used on guest devices > featuring removable media but no actual tray, because > blk_dev_is_tray_open() always returned false for them and the > blockdev-{insert,remove}-medium commands required it to return true. > > Fix this by making blockdev-{insert,remove}-medium work on tray-less > devices. Also, blockdev-{open,close}-tray are now explicitly no-ops when > invoked on such devices, and blk_dev_change_media_cb() is instead > called by blockdev-{insert,remove}-medium (for tray-less devices only). > > Reported-by: Peter Maydell > Cc: qemu-stable > Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Berto