[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
- [Qemu-devel] [PATCH 23/34] block: Pass driver-specific options to .bdrv_refresh_filename(), (continued)
- [Qemu-devel] [PATCH 23/34] block: Pass driver-specific options to .bdrv_refresh_filename(), Kevin Wolf, 2015/05/08
- [Qemu-devel] [PATCH 25/34] block: Allow specifying child options in reopen, Kevin Wolf, 2015/05/08
- [Qemu-devel] [PATCH 26/34] block: reopen: Document option precedence and refactor accordingly, Kevin Wolf, 2015/05/08
- [Qemu-devel] [PATCH 24/34] block: Keep "driver" in bs->options, Kevin Wolf, 2015/05/08
- [Qemu-devel] [PATCH 27/34] block: Add infrastructure for option inheritance, Kevin Wolf, 2015/05/08
- [Qemu-devel] [PATCH 28/34] block: Introduce bs->explicit_options, Kevin Wolf, 2015/05/08
- [Qemu-devel] [PATCH 29/34] qemu-iotests: Remove cache mode test without medium, Kevin Wolf, 2015/05/08
- [Qemu-devel] [PATCH 30/34] block: reopen: Extract QemuOpts for generic block layer options, Kevin Wolf, 2015/05/08
- [Qemu-devel] [PATCH 31/34] block: Move cache options into options QDict, Kevin Wolf, 2015/05/08
- [Qemu-devel] [PATCH 32/34] qemu-iotests: Try setting cache mode for children, Kevin Wolf, 2015/05/08