qemu-block
[Top][All Lists]
Advanced

[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




reply via email to

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