[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] block: Add errp to bdrv_new()
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] block: Add errp to bdrv_new() |
Date: |
Thu, 17 Apr 2014 14:44:20 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 17.04.2014 um 14:11 hat Eric Blake geschrieben:
> On 04/17/2014 05:53 AM, Kevin Wolf wrote:
> > This patch adds an errp parameter to bdrv_new() and updates all its
> > callers. The next patch will make use of this in order to check for
> > duplicate IDs. Most of the callers know that their ID is fine, so they
> > can simply assert that there is no error.
> >
> > Behaviour doesn't change with this patch yet as bdrv_new() doesn't
> > actually assign errors to errp.
> >
> > Signed-off-by: Kevin Wolf <address@hidden>
> > ---
>
> > @@ -1220,7 +1220,8 @@ void bdrv_append_temp_snapshot(BlockDriverState *bs,
> > Error **errp)
> > qdict_put(snapshot_options, "file.filename",
> > qstring_from_str(tmp_filename));
> >
> > - bs_snapshot = bdrv_new("");
> > + bs_snapshot = bdrv_new("", &local_err);
> > + assert(!local_err);
>
> Please write this as bdrv_new("", &error_abort) rather than as two
> lines; throughout the patch.
Ah, yes, I forgot that this exists. I'll change that.
Also, qemu-iotests noticed that not all of these assertions actually
hold true, so I need to respin the series anyway.
Kevin
pgpNgdqPZsNHZ.pgp
Description: PGP signature