From 1a9f7a804f52caee6bc6769a8bb0a018e6c8ec81 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 24 Sep 2020 17:27:07 +0200 Subject: block/export: Add BLOCK_EXPORT_DELETED event Clients may want to know when an export has finally disappeard (block-export-del returns earlier than that in the general case), so add a QAPI event for it. Signed-off-by: Kevin Wolf Message-Id: <20200924152717.287415-22-kwolf@redhat.com> Acked-by: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block/export/export.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'block') diff --git a/block/export/export.c b/block/export/export.c index d186beffe9..87940d5c40 100644 --- a/block/export/export.c +++ b/block/export/export.c @@ -19,6 +19,7 @@ #include "block/nbd.h" #include "qapi/error.h" #include "qapi/qapi-commands-block-export.h" +#include "qapi/qapi-events-block-export.h" #include "qemu/id.h" static const BlockExportDriver *blk_exp_drivers[] = { @@ -113,6 +114,7 @@ static void blk_exp_delete_bh(void *opaque) assert(exp->refcount == 0); QLIST_REMOVE(exp, next); exp->drv->delete(exp); + qapi_event_send_block_export_deleted(exp->id); g_free(exp->id); g_free(exp); -- cgit v1.2.3