]> git.proxmox.com Git - qemu.git/blobdiff - block.c
block: handle -EBUSY in bdrv_commit_all()
[qemu.git] / block.c
diff --git a/block.c b/block.c
index 52ffe1494a2326549960187021aa5278b5b0313b..b88ee9081748a7f37d901ae8d67e99a261d09e6a 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1244,13 +1244,17 @@ ro_cleanup:
     return ret;
 }
 
-void bdrv_commit_all(void)
+int bdrv_commit_all(void)
 {
     BlockDriverState *bs;
 
     QTAILQ_FOREACH(bs, &bdrv_states, list) {
-        bdrv_commit(bs);
+        int ret = bdrv_commit(bs);
+        if (ret < 0) {
+            return ret;
+        }
     }
+    return 0;
 }
 
 struct BdrvTrackedRequest {