diff options
author | Kevin Wolf <kwolf@redhat.com> | 2020-09-24 17:27:07 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-10-02 15:46:40 +0200 |
commit | 1a9f7a804f52caee6bc6769a8bb0a018e6c8ec81 (patch) | |
tree | 7e490524d05050c6c2f07b71fce77f4952736ef9 /block/export | |
parent | 3c3bc462adeb561f5dfdcbb84ae691c95ccef916 (diff) |
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 <kwolf@redhat.com>
Message-Id: <20200924152717.287415-22-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/export')
-rw-r--r-- | block/export/export.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |