On 21/11/2014 11:49, Stefan Hajnoczi wrote:
> The BLOCK_OP_TYPE_EXTERNAL_SNAPSHOT op blocker exists but was never
> used!  Let's fix that so external snapshot can be blocked.

The patch is about internal snapshots tho. :)

Paolo

> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
> ---
>  blockdev.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/blockdev.c b/blockdev.c
> index 90cb33d..d63bb7f 100644
> --- a/blockdev.c
> +++ b/blockdev.c
> @@ -1236,6 +1236,10 @@ static void 
> internal_snapshot_prepare(BlkTransactionState *common,
>          return;
>      }
>  
> +    if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_INTERNAL_SNAPSHOT, errp)) {
> +        return;
> +    }
> +
>      if (bdrv_is_read_only(bs)) {
>          error_set(errp, QERR_DEVICE_IS_READ_ONLY, device);
>          return;
> 

Reply via email to