block/export: Add blk_exp_close_all(_type)
This adds a function to shut down all block exports, and another one to shut down the block exports of a single type. The latter is used for now when stopping the NBD server. As soon as we implement support for multiple NBD servers, we'll need a per-server list of exports and it will be replaced by a function using that. As a side effect, the BlockExport layer has a list tracking all existing exports now. closed_exports loses its only user and can go away. Signed-off-by:Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-18-kwolf@redhat.com> Acked-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
Showing
- block.c 1 addition, 1 deletionblock.c
- block/export/export.c 84 additions, 2 deletionsblock/export/export.c
- blockdev-nbd.c 1 addition, 1 deletionblockdev-nbd.c
- include/block/export.h 15 additions, 0 deletionsinclude/block/export.h
- include/block/nbd.h 0 additions, 2 deletionsinclude/block/nbd.h
- nbd/server.c 5 additions, 29 deletionsnbd/server.c
- qemu-nbd.c 1 addition, 1 deletionqemu-nbd.c
Loading
Please register or sign in to comment