block: Create authorizations mechanism for external snapshot and resize.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Benoît Canet 2014-01-23 21:31:36 +01:00 committed by Kevin Wolf
parent 12d3ba821d
commit 212a5a8f09
5 changed files with 76 additions and 23 deletions

View file

@ -1243,7 +1243,7 @@ static void external_snapshot_prepare(BlkTransactionState *common,
}
}
if (bdrv_check_ext_snapshot(state->old_bs) != EXT_SNAPSHOT_ALLOWED) {
if (!bdrv_is_first_non_filter(state->old_bs)) {
error_set(errp, QERR_FEATURE_DISABLED, "snapshot");
return;
}