qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH 07/13] nbd: do not close BlockDriverState in nbd


From: Paolo Bonzini
Subject: [Qemu-devel] [RFC PATCH 07/13] nbd: do not close BlockDriverState in nbd_export_close
Date: Mon, 27 Aug 2012 17:00:20 +0200

This is not desirable when embedding the NBD server inside QEMU.
Move the bdrv_close to qemu-nbd.

Signed-off-by: Paolo Bonzini <address@hidden>
---
 nbd.c      | 1 -
 qemu-nbd.c | 1 +
 2 file modificati, 1 inserzione(+). 1 rimozione(-)

diff --git a/nbd.c b/nbd.c
index fe7551d..1f65b1f 100644
--- a/nbd.c
+++ b/nbd.c
@@ -893,7 +893,6 @@ void nbd_export_close(NBDExport *exp)
         g_free(exp->name);
     }
 
-    bdrv_close(exp->bs);
     g_free(exp);
 }
 
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 1c1cf6a..23392e0 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -586,6 +586,7 @@ int main(int argc, char **argv)
     } while (!sigterm_reported && (persistent || !nbd_started || nb_fds > 0));
 
     nbd_export_close(exp);
+    bdrv_close(bs);
     if (sockpath) {
         unlink(sockpath);
     }
-- 
1.7.11.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]