From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPs2g-0004jz-6q for qemu-devel@nongnu.org; Mon, 23 Feb 2015 07:23:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPs2a-000831-8K for qemu-devel@nongnu.org; Mon, 23 Feb 2015 07:23:18 -0500 Received: from smtp3.mundo-r.com ([212.51.32.191]:40597 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPs2a-00082Y-2B for qemu-devel@nongnu.org; Mon, 23 Feb 2015 07:23:12 -0500 Date: Mon, 23 Feb 2015 13:23:08 +0100 From: Alberto Garcia Message-ID: <20150223122308.GA11820@igalia.com> References: <49b845c4a362ffd64ec78bbe0b165cd7addd2a4b.1424439295.git.berto@igalia.com> <54E7B74C.7010307@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54E7B74C.7010307@redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/3] block: Add QMP support for streaming to an intermediate layer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi On Fri, Feb 20, 2015 at 03:38:04PM -0700, Eric Blake wrote: > > + if (has_top) { > > + top_bs = bdrv_find_backing_image(bs, top); > > + if (top_bs == NULL) { > > + error_set(errp, QERR_TOP_NOT_FOUND, top); > > + goto out; > > + } > > If I understand correctly, bdrv_find_backing_image has problems for > backing nodes that don't have a file name. Given our shift towards > node names, I think we really want to target node names rather than > file names when specifying which node we will use as the top bound > receiving the stream operations. Sure I can change that, but note that the 'base' parameter also receives a file name and uses bdrv_find_backing_image, so I guess it makes sense to change it in both sides. > > +#define QERR_TOP_NOT_FOUND \ > > + ERROR_CLASS_GENERIC_ERROR, "Top '%s' not found" > > + > > Please don't. Just use error_setg() at the right place with the > direct message (existing QERR_ macros are a legacy holdover, and we > shouldn't be creating more of them). Ok, I'll fix that. I'll wait for more comments regarding the top / base parameters before resubmitting the patches. Thanks, Berto