aboutsummaryrefslogtreecommitdiff
path: root/nbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'nbd.c')
-rw-r--r--nbd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nbd.c b/nbd.c
index 6f60dcfce5..57edfde0c9 100644
--- a/nbd.c
+++ b/nbd.c
@@ -914,6 +914,7 @@ void nbd_export_close(NBDExport *exp)
QTAILQ_FOREACH_SAFE(client, &exp->clients, next, next) {
nbd_client_close(client);
}
+ nbd_export_set_name(exp, NULL);
nbd_export_put(exp);
}
@@ -948,13 +949,17 @@ void nbd_export_put(NBDExport *exp)
}
}
+BlockDriverState *nbd_export_get_blockdev(NBDExport *exp)
+{
+ return exp->bs;
+}
+
void nbd_export_close_all(void)
{
NBDExport *exp, *next;
QTAILQ_FOREACH_SAFE(exp, &exports, next, next) {
nbd_export_close(exp);
- nbd_export_set_name(exp, NULL);
}
}