diff options
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c index 0a519029b8..9a9bdec7da 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1889,6 +1889,10 @@ void qmp_block_stream(const char *device, bool has_base, return; } + if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_STREAM, errp)) { + return; + } + if (base) { base_bs = bdrv_find_backing_image(bs, base); if (base_bs == NULL) { @@ -1933,6 +1937,10 @@ void qmp_block_commit(const char *device, return; } + if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_COMMIT, errp)) { + return; + } + /* default top_bs is the active layer */ top_bs = bs; |