]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
storage-daemon: Call bdrv_close_all() on exit
authorMax Reitz <mreitz@redhat.com>
Tue, 27 Oct 2020 19:05:56 +0000 (20:05 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 11 Dec 2020 16:52:40 +0000 (17:52 +0100)
Otherwise, exports and block devices are not properly shut down and
closed, unless the users explicitly issues blockdev-del and
block-export-del commands for each of them.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201027190600.192171-17-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
storage-daemon/qemu-storage-daemon.c

index 7c914b0dc1f851d6b6e72afd296c1a3be7c0c97a..e0c87edbdd489903e683480b267f8e00c4533d8b 100644 (file)
@@ -314,6 +314,9 @@ int main(int argc, char *argv[])
         main_loop_wait(false);
     }
 
+    bdrv_drain_all_begin();
+    bdrv_close_all();
+
     monitor_cleanup();
     qemu_chr_cleanup();
     user_creatable_cleanup();