[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 1/7] block: return error-code from bdrv_invalidate_cache
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v8 1/7] block: return error-code from bdrv_invalidate_cache |
Date: |
Thu, 24 Sep 2020 10:26:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 9/15/20 6:44 PM, Vladimir Sementsov-Ogievskiy wrote:
> This is the only coroutine wrapper from block.c and block/io.c which
> doesn't return a value, so let's convert it to the common behavior, to
> simplify moving to generated coroutine wrappers in a further commit.
>
> Also, bdrv_invalidate_cache is a void function, returning error only
> through **errp parameter, which is considered to be bad practice, as
> it forces callers to define and propagate local_err variable, so
> conversion is good anyway.
>
> This patch leaves the conversion of .bdrv_co_invalidate_cache() driver
> callbacks and bdrv_invalidate_cache_all() for another day.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> ---
> include/block/block.h | 2 +-
> block.c | 32 ++++++++++++++++++--------------
> 2 files changed, 19 insertions(+), 15 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>