Received: from eggs.gnu.org ([2001:4830:134:3::10]:48434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNdZa-0000lA-Fz for qemu-devel@nongnu.org; Mon, 25 Jan 2016 04:36:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNdZZ-0007Dl-Gc for qemu-devel@nongnu.org; Mon, 25 Jan 2016 04:36:34 -0500 From: Alberto Garcia In-Reply-To: <1453503050-20187-3-git-send-email-mreitz@redhat.com> References: <1453503050-20187-1-git-send-email-mreitz@redhat.com> <1453503050-20187-3-git-send-email-mreitz@redhat.com> Date: Mon, 25 Jan 2016 10:35:50 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH v3 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 , qemu-stable , qemu-devel@nongnu.org, Markus Armbruster , John Snow On Fri 22 Jan 2016 11:50:48 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