]> Git Repo - qemu.git/blobdiff - block.c
qmp-input: Clean up stack handling
[qemu.git] / block.c
diff --git a/block.c b/block.c
index d36eb75be96a2c027c206e36deb1ada53c25f0f8..d4939b49bf05b1778306c4b13f2b2dce70af4ca9 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1526,6 +1526,13 @@ static int bdrv_open_inherit(BlockDriverState **pbs, const char *filename,
         if (!bs) {
             return -ENODEV;
         }
+
+        if (bs->throttle_state) {
+            error_setg(errp, "Cannot reference an existing block device for "
+                       "which I/O throttling is enabled");
+            return -EINVAL;
+        }
+
         bdrv_ref(bs);
         *pbs = bs;
         return 0;
This page took 0.021805 seconds and 4 git commands to generate.