mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
block/export: call blk_set_dev_ops(blk, NULL, NULL)
Most export types install BlockDeviceOps pointers. It is easy to forget to remove them because that happens automatically via the "drive" qdev property in hw/ but not block/export/. Put blk_set_dev_ops(blk, NULL, NULL) calls in the core export.c code so the export types don't need to remember. This fixes the nbd and vhost-user-blk export types. Fixes:fd6afc501a
("nbd/server: Use drained block ops to quiesce the server") Fixes:ca858a5fe9
("vhost-user-blk-server: notify client about disk resize") Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20230502211119.720647-1-stefanha@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
7ade2b186d
commit
de79b52604
2 changed files with 2 additions and 1 deletions
|
@ -346,7 +346,6 @@ static void vduse_blk_exp_delete(BlockExport *exp)
|
|||
|
||||
blk_remove_aio_context_notifier(exp->blk, blk_aio_attached, blk_aio_detach,
|
||||
vblk_exp);
|
||||
blk_set_dev_ops(exp->blk, NULL, NULL);
|
||||
ret = vduse_dev_destroy(vblk_exp->dev);
|
||||
if (ret != -EBUSY) {
|
||||
unlink(vblk_exp->recon_file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue