From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39622) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxvlB-0003OL-6E for qemu-devel@nongnu.org; Thu, 28 May 2015 07:14:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yxvl8-0000lV-0I for qemu-devel@nongnu.org; Thu, 28 May 2015 07:14:01 -0400 Message-ID: <5566F7B7.50809@cn.fujitsu.com> Date: Thu, 28 May 2015 19:10:47 +0800 From: Wen Congyang MIME-Version: 1.0 References: <1431105726-3682-1-git-send-email-kwolf@redhat.com> <1431105726-3682-8-git-send-email-kwolf@redhat.com> In-Reply-To: <1431105726-3682-8-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/34] block: Move flag inheritance to bdrv_open_inherited() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: mreitz@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com On 05/09/2015 01:21 AM, Kevin Wolf wrote: > Instead of letting every caller of bdrv_open() determine the right flags > for its child node manually and pass them to the function, pass the > parent node and the role of the newly opened child (like backing file, > protocol layer, etc.). > > Signed-off-by: Kevin Wolf > --- > block.c | 74 ++++++++++++++++++++++++++++++++++++++--------- > block/blkdebug.c | 2 +- > block/blkverify.c | 4 +-- > block/quorum.c | 4 +-- > block/vmdk.c | 5 ++-- > include/block/block.h | 4 ++- > include/block/block_int.h | 7 +++++ > 7 files changed, 78 insertions(+), 22 deletions(-) > > diff --git a/block.c b/block.c > index cea022f..c4f0fb4 100644 > --- a/block.c > +++ b/block.c > @@ -79,6 +79,12 @@ static QTAILQ_HEAD(, BlockDriverState) graph_bdrv_states = > static QLIST_HEAD(, BlockDriver) bdrv_drivers = > QLIST_HEAD_INITIALIZER(bdrv_drivers); > > +static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename, > + const char *reference, QDict *options, int flags, > + BlockDriverState* parent, > + const BdrvChildRole *child_role, > + BlockDriver *drv, Error **errp); The function name in patch title is wrong. Thanks Wen Congyang