mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
nbd: add reference counting to NBDExport
We will use a similar two-phase destruction for NBDExport, so we need each NBDClient to add a reference to NBDExport. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ff2b68aa70
commit
2c8d9f0655
3 changed files with 35 additions and 6 deletions
2
nbd.h
2
nbd.h
|
@ -81,6 +81,8 @@ typedef struct NBDClient NBDClient;
|
|||
NBDExport *nbd_export_new(BlockDriverState *bs, off_t dev_offset,
|
||||
off_t size, uint32_t nbdflags);
|
||||
void nbd_export_close(NBDExport *exp);
|
||||
void nbd_export_get(NBDExport *exp);
|
||||
void nbd_export_put(NBDExport *exp);
|
||||
|
||||
NBDClient *nbd_client_new(NBDExport *exp, int csock,
|
||||
void (*close)(NBDClient *));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue