From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNfHO-0003np-6O for qemu-devel@nongnu.org; Mon, 25 Jan 2016 06:25:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNfHN-0006HL-CD for qemu-devel@nongnu.org; Mon, 25 Jan 2016 06:25:54 -0500 Date: Mon, 25 Jan 2016 12:25:45 +0100 From: Kevin Wolf Message-ID: <20160125112545.GD5154@noname.redhat.com> References: <1453503050-20187-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1453503050-20187-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 0/4] blockdev: Fix 'change' for slot devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Alberto Garcia , qemu-block@nongnu.org, qemu-devel@nongnu.org, Markus Armbruster , John Snow Am 22.01.2016 um 23:50 hat Max Reitz geschrieben: > The series "BlockBackend and media" intended all block devices with > removable media to implement a tray model; if the devices does not have > a tray, it should emulate one. > > While this may make sense from a technical perspective (blockdev-*-tray > are guest device controlling operations, invoking > blk_dev_change_media_cb(); blockdev-*-medium are operations concerning > the block layer, controlling the BB-BDS link), it is (probably) > unintuitive to users, and it requires said implementation of an emulated > tray for each of the slot devices (floppy disk drives and SD card > readers). > > We can get rid of those virtual trays by special-casing tray-less > devices in blockdev-*-tray (those operations are no-ops there) and in > blockdev-*-medium (those operations then have to invoke > blk_dev_change_media_cb()). With this change, changing the medium > inserted into a slot device will no longer emit TRAY_MOVED events (which > seems like a bugfix to me, because slot devices actually do not have > trays). Thanks, applied to the block branch. Kevin