diff options
-rw-r--r-- | blockdev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/blockdev.c b/blockdev.c index fb9a0059c3..a7f1e09bce 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1132,6 +1132,10 @@ SnapshotInfo *qmp_blockdev_snapshot_delete_internal_sync(const char *device, aio_context = bdrv_get_aio_context(bs); aio_context_acquire(aio_context); + if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_INTERNAL_SNAPSHOT_DELETE, errp)) { + goto out_aio_context; + } + ret = bdrv_snapshot_find_by_id_and_name(bs, id, name, &sn, &local_err); if (local_err) { error_propagate(errp, local_err); |