[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v25 11/31] change block layer to support both Qe
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v25 11/31] change block layer to support both QemuOpts and QEMUOptionParamter |
Date: |
Fri, 25 Apr 2014 15:36:52 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Apr 21, 2014 at 05:17:50PM -0600, Eric Blake wrote:
> On 04/10/2014 11:54 AM, Chunyan Liu wrote:
> > Change block layer to support both QemuOpts and QEMUOptionParameter.
> > After this patch, it will change backend drivers one by one. At the end,
> > QEMUOptionParameter will be removed and only QemuOpts is kept.
> >
> > Signed-off-by: Dong Xu Wang <address@hidden>
> > Signed-off-by: Chunyan Liu <address@hidden>
> > ---
>
> > @@ -419,8 +420,27 @@ static void coroutine_fn bdrv_create_co_entry(void
> > *opaque)
> >
> > CreateCo *cco = opaque;
>
> > + if (cco->drv->bdrv_create2) {
> > + QemuOptsList *opts_list = NULL;
> > + QemuOpts *opts = NULL;
> > + if (!cco->opts) {
>
> Isn't your conversion pair-wise per driver, in that you always pair
> bdrv_create2 with options, and bdrv_create with opts? That is, won't
> cco->opts always be false if cco->drv->bdrv_create2 is non-NULL, since
> we already guaranteed that there is at most one of the two creation
> function callbacks defined? Maybe you have a missing assertion at the
> point where the callbacks are registered? [1]
I think you're right but not sure it's worth changing since this is
temporary code that gets removed later in the patch series anyway.
Stefan
- Re: [Qemu-devel] [PATCH v25 07/31] QemuOpts: add qemu_opts_print_help to replace print_option_help, (continued)
- [Qemu-devel] [PATCH v25 10/31] QemuOpts: check NULL input for qemu_opts_del, Chunyan Liu, 2014/04/11
- [Qemu-devel] [PATCH v25 13/31] cow.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/11
- [Qemu-devel] [PATCH v25 12/31] vvfat.c: handle cross_driver's create_options and create_opts, Chunyan Liu, 2014/04/11
- [Qemu-devel] [PATCH v25 14/31] gluster.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/11
- [Qemu-devel] [PATCH v25 15/31] iscsi.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/11
- [Qemu-devel] [PATCH v25 17/31] qcow.c: replace QEMUOptionParameter with QemuOpts, Chunyan Liu, 2014/04/11