qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 27/34] block: Add infrastructure for option inhe


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 27/34] block: Add infrastructure for option inheritance
Date: Wed, 13 May 2015 17:28:03 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 13.05.2015 um 17:10 hat Max Reitz geschrieben:
> On 08.05.2015 19:21, Kevin Wolf wrote:
> >Options are not actually inherited from the parent node yet, but this
> >commit lays the grounds for doing so.
> >
> >Signed-off-by: Kevin Wolf <address@hidden>
> >---
> >  block.c                   | 51 
> > ++++++++++++++++++++++++++---------------------
> >  include/block/block_int.h |  3 ++-
> >  2 files changed, 30 insertions(+), 24 deletions(-)
> >
> >diff --git a/block.c b/block.c
> >index 1e5625f..9259b42 100644
> >--- a/block.c
> >+++ b/block.c
> >@@ -678,11 +678,14 @@ static int bdrv_temp_snapshot_flags(int flags)
> >  }
> >  /*
> >- * Returns the flags that bs->file should get if a protocol driver is 
> >expected,
> >- * based on the given flags for the parent BDS
> >+ * Returns the options and flags that bs->file should get if a protocol 
> >driver
> >+ * is expected, based on the given flags for the parent BDS
> >   */
> >-static int bdrv_inherited_flags(int flags)
> >+static void bdrv_inherited_options(int *child_flags, QDict *child_options,
> >+                                   int parent_flags, QDict *parent_options)
> >  {
> >+    int flags = parent_flags;
> >+
> >      /* Enable protocol handling, disable format probing for bs->file */
> >      flags |= BDRV_O_PROTOCOL;
> >@@ -693,45 +696,46 @@ static int bdrv_inherited_flags(int flags)
> >      /* Clear flags that only apply to the top layer */
> >      flags &= ~(BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING | BDRV_O_COPY_ON_READ);
> >-    return flags;
> >+    *child_flags = flags;
> >  }
> >  const BdrvChildRole child_file = {
> >-    .inherit_flags = bdrv_inherited_flags,
> >+    .inherit_options = bdrv_inherited_options,
> >  };
> >-/*
> >- * Returns the flags that bs->file should get if the use of formats (and not
> >- * only protocols) is permitted for it, based on the given flags for the 
> >parent
> >- * BDS
> >- */
> 
> Is removing this comment intentional?

Looks like a mismerge, thanks.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]