[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 13/14] block/qed: bdrv_qed_do_open: deal with errp
From: |
Eric Blake |
Subject: |
Re: [PATCH v7 13/14] block/qed: bdrv_qed_do_open: deal with errp |
Date: |
Fri, 12 Feb 2021 16:18:50 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 2/2/21 6:49 AM, Vladimir Sementsov-Ogievskiy wrote:
> Set errp always on failure. Generic bdrv_open_driver supports driver
> functions which can return negative value and forget to set errp.
> That's a strange thing.. Let's improve bdrv_qed_do_open to not behave
> this way. This allows to simplify code in
> bdrv_qed_co_invalidate_cache().
Grammar tweak:
Always set errp on failure. Generic bdrv_open_driver supports driver
functions which can return a negative value but forget to set errp.
That's a strange thing. Let's improve bdrv_qed_do_open to not behave
this way. This allows the simplification of code in
bdrv_qed_co_invalidate_cache().
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> Reviewed-by: Alberto Garcia <berto@igalia.com>
> Reviewed-by: Greg Kurz <groug@kaod.org>
> ---
> block/qed.c | 24 +++++++++++++++---------
> 1 file changed, 15 insertions(+), 9 deletions(-)
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
- Re: [PATCH v7 03/14] block: check return value of bdrv_open_child and drop error propagation, (continued)
- [PATCH v7 13/14] block/qed: bdrv_qed_do_open: deal with errp, Vladimir Sementsov-Ogievskiy, 2021/02/02
- Re: [PATCH v7 13/14] block/qed: bdrv_qed_do_open: deal with errp,
Eric Blake <=
- [PATCH v7 09/14] block/qcow2-bitmap: improve qcow2_load_dirty_bitmaps() interface, Vladimir Sementsov-Ogievskiy, 2021/02/02
- [PATCH v7 11/14] block/qcow2: read_cache_sizes: return status value, Vladimir Sementsov-Ogievskiy, 2021/02/02
- [PATCH v7 14/14] block/qcow2: refactor qcow2_update_options_prepare error paths, Vladimir Sementsov-Ogievskiy, 2021/02/02
- [PATCH v7 12/14] block/qcow2: simplify qcow2_co_invalidate_cache(), Vladimir Sementsov-Ogievskiy, 2021/02/02