aboutsummaryrefslogtreecommitdiff
path: root/nbd.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-09-18 13:26:25 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2012-09-19 15:26:28 +0200
commit2c8d9f065538a5a0ef2421e90b6076d05148accf (patch)
treee302eabc6302f61e5a2f1c41f7afe7b06f7cbdab /nbd.h
parentff2b68aa70d10b7eae813b04e9a23723dbd89ebd (diff)
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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/nbd.h b/nbd.h
index 8b84a50ed4..86921cd048 100644
--- a/nbd.h
+++ b/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 *));