Received: from eggs.gnu.org ([2001:4830:134:3::10]:53551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeOaO-0007TU-KM for qemu-devel@nongnu.org; Tue, 22 Sep 2015 10:30:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeOaI-0001np-Ns for qemu-devel@nongnu.org; Tue, 22 Sep 2015 10:30:24 -0400 Date: Tue, 22 Sep 2015 16:30:12 +0200 From: Kevin Wolf Message-ID: <20150922143012.GE3999@noname.str.redhat.com> References: <1442589793-7105-1-git-send-email-mreitz@redhat.com> <1442589793-7105-20-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1442589793-7105-20-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v5 19/38] block: Fail requests to empty BlockBackend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Alberto Garcia , qemu-block@nongnu.org, John Snow , qemu-devel@nongnu.org, Markus Armbruster , Stefan Hajnoczi Am 18.09.2015 um 17:22 hat Max Reitz geschrieben: > 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 Do we want to include blk_drain() to make it a no-op instead of crashing? Also, we're now introducing BlockAIOCBs with a NULL bs with your use of abort_aio_request. I haven't carefully reviewed the implications of this yet, but that should definitely be done before we merge the series. Kevin