From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQgXl-0004ba-Dk for qemu-devel@nongnu.org; Wed, 25 Feb 2015 13:18:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQgXg-0005SG-G4 for qemu-devel@nongnu.org; Wed, 25 Feb 2015 13:18:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQgXg-0005RV-90 for qemu-devel@nongnu.org; Wed, 25 Feb 2015 13:18:40 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1PIIcoQ012154 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 25 Feb 2015 13:18:39 -0500 Message-ID: <54EE11FD.1090907@redhat.com> Date: Wed, 25 Feb 2015 13:18:37 -0500 From: Max Reitz MIME-Version: 1.0 References: <1423501897-30410-1-git-send-email-mreitz@redhat.com> <1423501897-30410-17-git-send-email-mreitz@redhat.com> In-Reply-To: <1423501897-30410-17-git-send-email-mreitz@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 16/37] block: Fail requests to empty BlockBackend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , John Snow , Markus Armbruster , Stefan Hajnoczi On 2015-02-09 at 12:11, Max Reitz wrote: > If there is no BlockDriverState in a BlockBackend or if the tray of the > guest device is open, fail all requests (where that is possible) with > -ENOMEDIUM. > > The reason the status of the guest device is taken into account is > because once the guest device's tray is opened, any request on the same > BlockBackend as the guest uses should fail. If the BDS tree is supposed > to be usable even after ejecting it from the guest, a different > BlockBackend must be used. > > Signed-off-by: Max Reitz > Reviewed-by: Eric Blake > --- > block/block-backend.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 46 insertions(+), 1 deletion(-) Note that this patch needs to be amended to accommodate for https://github.com/stefanha/qemu/commit/17b10170718f8b7cdaed225da4b9c473996cf250. Max