diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-09-18 13:26:25 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-09-19 15:26:28 +0200 |
commit | 2c8d9f065538a5a0ef2421e90b6076d05148accf (patch) | |
tree | e302eabc6302f61e5a2f1c41f7afe7b06f7cbdab /nbd.h | |
parent | ff2b68aa70d10b7eae813b04e9a23723dbd89ebd (diff) | |
download | qemu-2c8d9f065538a5a0ef2421e90b6076d05148accf.tar.gz qemu-2c8d9f065538a5a0ef2421e90b6076d05148accf.tar.bz2 qemu-2c8d9f065538a5a0ef2421e90b6076d05148accf.zip |
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>
Diffstat (limited to 'nbd.h')
-rw-r--r-- | nbd.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 *)); |