|
From: | Max Reitz |
Subject: | Re: [Qemu-devel] [PATCH for-2.4 2/5] block: Introduce bdrv_open_child() |
Date: | Fri, 10 Jul 2015 17:51:26 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 |
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 <address@hidden> --- 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 <address@hidden>
[Prev in Thread] | Current Thread | [Next in Thread] |