[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 1/7] block: return error-code from bdrv_invalidate_cache
From: |
Eric Blake |
Subject: |
Re: [PATCH v5 1/7] block: return error-code from bdrv_invalidate_cache |
Date: |
Wed, 27 May 2020 17:03:05 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 5/27/20 3:37 PM, Vladimir Sementsov-Ogievskiy wrote:
This is the only coroutine wrapper from block.c and block/io.c which
doesn't return value, so let's convert it to the common behavior, to
s/value/a value/
simplify moving to generated coroutine wrappers in further commit.
s/in/in a/
Also, bdrv_invalidate_cache is a void function, returning error only
through **errp parameter, which considered to be bad practice, as it
s/which/which is/
forces callers to define and propagate local_err variable, so
conversion is good anyway.
This patch leaves convertion of .bdrv_co_invalidate_cache() driver
s/convertion/the conversion/
callbacks and bdrv_invalidate_cache_all() for another-day refactoring.
s/another-day refactoring/another day/
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
include/block/block.h | 2 +-
block.c | 32 ++++++++++++++++++--------------
2 files changed, 19 insertions(+), 15 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
- [PATCH v5 0/7] coroutines: generate wrapper code, Vladimir Sementsov-Ogievskiy, 2020/05/27
- [PATCH v5 1/7] block: return error-code from bdrv_invalidate_cache, Vladimir Sementsov-Ogievskiy, 2020/05/27
- Re: [PATCH v5 1/7] block: return error-code from bdrv_invalidate_cache,
Eric Blake <=
- [PATCH v5 2/7] block/io: refactor coroutine wrappers, Vladimir Sementsov-Ogievskiy, 2020/05/27
- [PATCH v5 4/7] scripts: add coroutine-wrapper.py, Vladimir Sementsov-Ogievskiy, 2020/05/27
- [PATCH v5 3/7] block: declare some coroutine functions in block/coroutines.h, Vladimir Sementsov-Ogievskiy, 2020/05/27
- [PATCH v5 5/7] block: generate coroutine-wrapper code, Vladimir Sementsov-Ogievskiy, 2020/05/27
- [PATCH v5 7/7] block/io: refactor save/load vmstate, Vladimir Sementsov-Ogievskiy, 2020/05/27
- [PATCH v5 6/7] block: drop bdrv_prwv, Vladimir Sementsov-Ogievskiy, 2020/05/27
- Re: [PATCH v5 0/7] coroutines: generate wrapper code, no-reply, 2020/05/27
- Re: [PATCH v5 0/7] coroutines: generate wrapper code, no-reply, 2020/05/27