[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 06/13] util/vhost-user-server: drop unused DevicePanicNotifier
From: |
Stefan Hajnoczi |
Subject: |
[PATCH v2 06/13] util/vhost-user-server: drop unused DevicePanicNotifier |
Date: |
Thu, 24 Sep 2020 16:15:42 +0100 |
The device panic notifier callback is not used. Drop it.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
util/vhost-user-server.h | 3 ---
block/export/vhost-user-blk-server.c | 3 +--
util/vhost-user-server.c | 6 ------
3 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/util/vhost-user-server.h b/util/vhost-user-server.h
index 5232f96718..92177fc911 100644
--- a/util/vhost-user-server.h
+++ b/util/vhost-user-server.h
@@ -29,12 +29,10 @@ typedef struct VuFdWatch {
} VuFdWatch;
typedef struct VuServer VuServer;
-typedef void DevicePanicNotifierFn(VuServer *server);
struct VuServer {
QIONetListener *listener;
AioContext *ctx;
- DevicePanicNotifierFn *device_panic_notifier;
int max_queues;
const VuDevIface *vu_iface;
VuDev vu_dev;
@@ -54,7 +52,6 @@ bool vhost_user_server_start(VuServer *server,
SocketAddress *unix_socket,
AioContext *ctx,
uint16_t max_queues,
- DevicePanicNotifierFn *device_panic_notifier,
const VuDevIface *vu_iface,
Error **errp);
diff --git a/block/export/vhost-user-blk-server.c
b/block/export/vhost-user-blk-server.c
index ef07a87eb1..f2bfddbf26 100644
--- a/block/export/vhost-user-blk-server.c
+++ b/block/export/vhost-user-blk-server.c
@@ -439,8 +439,7 @@ static void vhost_user_blk_server_start(VuBlockDev
*vu_block_device,
ctx = bdrv_get_aio_context(blk_bs(vu_block_device->backend));
if (!vhost_user_server_start(&vu_block_device->vu_server, addr, ctx,
- VHOST_USER_BLK_MAX_QUEUES,
- NULL, &vu_block_iface,
+ VHOST_USER_BLK_MAX_QUEUES, &vu_block_iface,
errp)) {
goto error;
}
diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c
index ebb850731b..892815827d 100644
--- a/util/vhost-user-server.c
+++ b/util/vhost-user-server.c
@@ -81,10 +81,6 @@ static void panic_cb(VuDev *vu_dev, const char *buf)
close_client(server);
}
- if (server->device_panic_notifier) {
- server->device_panic_notifier(server);
- }
-
/*
* Set the callback function for network listener so another
* vhost-user client can connect to this server
@@ -385,7 +381,6 @@ bool vhost_user_server_start(VuServer *server,
SocketAddress *socket_addr,
AioContext *ctx,
uint16_t max_queues,
- DevicePanicNotifierFn *device_panic_notifier,
const VuDevIface *vu_iface,
Error **errp)
{
@@ -402,7 +397,6 @@ bool vhost_user_server_start(VuServer *server,
.vu_iface = vu_iface,
.max_queues = max_queues,
.ctx = ctx,
- .device_panic_notifier = device_panic_notifier,
};
qio_net_listener_set_name(server->listener, "vhost-user-backend-listener");
--
2.26.2
- [PATCH v2 00/13] block/export: convert vhost-user-blk-server to block exports API, Stefan Hajnoczi, 2020/09/24
- [PATCH v2 01/13] block/export: shorten serial string to fit, Stefan Hajnoczi, 2020/09/24
- [PATCH v2 02/13] util/vhost-user-server: s/fileds/fields/ typo fix, Stefan Hajnoczi, 2020/09/24
- [PATCH v2 03/13] util/vhost-user-server: drop unnecessary QOM cast, Stefan Hajnoczi, 2020/09/24
- [PATCH v2 04/13] util/vhost-user-server: drop unnecessary watch deletion, Stefan Hajnoczi, 2020/09/24
- [PATCH v2 05/13] block/export: consolidate request structs into VuBlockReq, Stefan Hajnoczi, 2020/09/24
- [PATCH v2 06/13] util/vhost-user-server: drop unused DevicePanicNotifier,
Stefan Hajnoczi <=
- [PATCH v2 07/13] util/vhost-user-server: fix memory leak in vu_message_read(), Stefan Hajnoczi, 2020/09/24
- [PATCH v2 08/13] util/vhost-user-server: check EOF when reading payload, Stefan Hajnoczi, 2020/09/24
- [PATCH v2 09/13] util/vhost-user-server: rework vu_client_trip() coroutine lifecycle, Stefan Hajnoczi, 2020/09/24
- [PATCH v2 10/13] block/export: report flush errors, Stefan Hajnoczi, 2020/09/24
- [PATCH v2 11/13] block/export: convert vhost-user-blk server to block export API, Stefan Hajnoczi, 2020/09/24
- [PATCH v2 13/13] util/vhost-user-server: use static library in meson.build, Stefan Hajnoczi, 2020/09/24
- [PATCH v2 12/13] util/vhost-user-server: move header to include/, Stefan Hajnoczi, 2020/09/24