From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDaaM-0007UE-46 for qemu-devel@nongnu.org; Fri, 10 Jul 2015 11:51:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDaaL-0000U9-8g for qemu-devel@nongnu.org; Fri, 10 Jul 2015 11:51:34 -0400 References: <1436384203-10576-1-git-send-email-kwolf@redhat.com> <1436384203-10576-3-git-send-email-kwolf@redhat.com> From: Max Reitz Message-ID: <559FE9FE.3040005@redhat.com> Date: Fri, 10 Jul 2015 17:51:26 +0200 MIME-Version: 1.0 In-Reply-To: <1436384203-10576-3-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.4 2/5] block: Introduce bdrv_open_child() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: berto@igalia.com, qemu-devel@nongnu.org, stefanha@redhat.com On 08.07.2015 21:36, Kevin Wolf wrote: > It is the same as bdrv_open_image(), except that it doesn't only return > success or failure, but the newly created BdrvChild object for the new > child node. > > As the BdrvChild object already contains a BlockDriverState pointer (and > this is supposed to become the only pointer so that bdrv_append() and > friends can just change a single pointer in BdrvChild), the pbs > parameter is removed for bdrv_open_child(). > > Signed-off-by: Kevin Wolf > --- > block.c | 71 +++++++++++++++++++++++++++++++++++++-------------- > include/block/block.h | 6 +++++ > 2 files changed, 58 insertions(+), 19 deletions(-) Are you planning on removing bdrv_open_image() later on? Because the version introduced here behaves differently than the one before this patch, in that before the error value returned by bdrv_open() was preserved. I don't think this is noticeable at all, though, since as long as there is an Error object involved, the exact value returned doesn't really matter (but I can't verify that assumption, since the value returned by bdrv_open_image() seems to be preserved by a lot of nested function calls). So: Reviewed-by: Max Reitz