[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/28] nbd: Remove nbd_co_flush() wrapper function
From: |
Kevin Wolf |
Subject: |
[PULL 16/28] nbd: Remove nbd_co_flush() wrapper function |
Date: |
Wed, 10 May 2023 14:20:59 +0200 |
The only thing nbd_co_flush() does is call nbd_client_co_flush(). Just
use that function directly in the BlockDriver definitions and remove the
wrapper.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230504115750.54437-10-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/nbd.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/block/nbd.c b/block/nbd.c
index bf2894ad5c..d3ee256844 100644
--- a/block/nbd.c
+++ b/block/nbd.c
@@ -1920,11 +1920,6 @@ fail:
return ret;
}
-static int coroutine_fn nbd_co_flush(BlockDriverState *bs)
-{
- return nbd_client_co_flush(bs);
-}
-
static void nbd_refresh_limits(BlockDriverState *bs, Error **errp)
{
BDRVNBDState *s = (BDRVNBDState *)bs->opaque;
@@ -2120,7 +2115,7 @@ static BlockDriver bdrv_nbd = {
.bdrv_co_pwritev = nbd_client_co_pwritev,
.bdrv_co_pwrite_zeroes = nbd_client_co_pwrite_zeroes,
.bdrv_close = nbd_close,
- .bdrv_co_flush_to_os = nbd_co_flush,
+ .bdrv_co_flush_to_os = nbd_client_co_flush,
.bdrv_co_pdiscard = nbd_client_co_pdiscard,
.bdrv_refresh_limits = nbd_refresh_limits,
.bdrv_co_truncate = nbd_co_truncate,
@@ -2148,7 +2143,7 @@ static BlockDriver bdrv_nbd_tcp = {
.bdrv_co_pwritev = nbd_client_co_pwritev,
.bdrv_co_pwrite_zeroes = nbd_client_co_pwrite_zeroes,
.bdrv_close = nbd_close,
- .bdrv_co_flush_to_os = nbd_co_flush,
+ .bdrv_co_flush_to_os = nbd_client_co_flush,
.bdrv_co_pdiscard = nbd_client_co_pdiscard,
.bdrv_refresh_limits = nbd_refresh_limits,
.bdrv_co_truncate = nbd_co_truncate,
@@ -2176,7 +2171,7 @@ static BlockDriver bdrv_nbd_unix = {
.bdrv_co_pwritev = nbd_client_co_pwritev,
.bdrv_co_pwrite_zeroes = nbd_client_co_pwrite_zeroes,
.bdrv_close = nbd_close,
- .bdrv_co_flush_to_os = nbd_co_flush,
+ .bdrv_co_flush_to_os = nbd_client_co_flush,
.bdrv_co_pdiscard = nbd_client_co_pdiscard,
.bdrv_refresh_limits = nbd_refresh_limits,
.bdrv_co_truncate = nbd_co_truncate,
--
2.40.1
- [PULL 04/28] block: Fix use after free in blockdev_mark_auto_del(), (continued)
- [PULL 04/28] block: Fix use after free in blockdev_mark_auto_del(), Kevin Wolf, 2023/05/10
- [PULL 05/28] iotests/nbd-reconnect-on-open: Fix NBD socket path, Kevin Wolf, 2023/05/10
- [PULL 06/28] migration: Attempt disk reactivation in more failure scenarios, Kevin Wolf, 2023/05/10
- [PULL 08/28] block: Consistently call bdrv_activate() outside coroutine, Kevin Wolf, 2023/05/10
- [PULL 12/28] test-bdrv-drain: Don't modify the graph in coroutines, Kevin Wolf, 2023/05/10
- [PULL 15/28] block: .bdrv_open is non-coroutine and unlocked, Kevin Wolf, 2023/05/10
- [PULL 10/28] block: Don't call no_coroutine_fns in qmp_block_resize(), Kevin Wolf, 2023/05/10
- [PULL 11/28] iotests: Test resizing image attached to an iothread, Kevin Wolf, 2023/05/10
- [PULL 14/28] graph-lock: Fix GRAPH_RDLOCK_GUARD*() to be reader lock, Kevin Wolf, 2023/05/10
- [PULL 13/28] graph-lock: Add GRAPH_UNLOCKED(_PTR), Kevin Wolf, 2023/05/10
- [PULL 16/28] nbd: Remove nbd_co_flush() wrapper function,
Kevin Wolf <=
- [PULL 20/28] block: Mark bdrv_co_get_allocated_file_size() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/05/10
- [PULL 09/28] block: bdrv/blk_co_unref() for calls in coroutine context, Kevin Wolf, 2023/05/10
- [PULL 18/28] vhdx: Require GRAPH_RDLOCK for accessing a node's parent list, Kevin Wolf, 2023/05/10
- [PULL 19/28] mirror: Require GRAPH_RDLOCK for accessing a node's parent list, Kevin Wolf, 2023/05/10
- [PULL 23/28] block: Mark BlockDriver callbacks for amend job GRAPH_RDLOCK, Kevin Wolf, 2023/05/10
- [PULL 22/28] block: Mark bdrv_co_debug_event() GRAPH_RDLOCK, Kevin Wolf, 2023/05/10
- [PULL 17/28] nbd: Mark nbd_co_do_establish_connection() and callers GRAPH_RDLOCK, Kevin Wolf, 2023/05/10