From f6186f49e2c98d91f22027d8c62996df4fcf3f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Canet?= Date: Wed, 2 Oct 2013 14:33:48 +0200 Subject: block: Add BlockDriver.bdrv_check_ext_snapshot. This field is used by blkverify to disable external snapshots creation. It will also be used by block filters like quorum to disable external snapshot creation. Signed-off-by: Benoit Canet Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'blockdev.c') diff --git a/blockdev.c b/blockdev.c index 8c83f6f1ca..a91d5a87df 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1131,6 +1131,11 @@ static void external_snapshot_prepare(BlkTransactionState *common, } } + if (bdrv_check_ext_snapshot(state->old_bs) != EXT_SNAPSHOT_ALLOWED) { + error_set(errp, QERR_FEATURE_DISABLED, "snapshot"); + return; + } + flags = state->old_bs->open_flags; /* create new image w/backing file */ -- cgit v1.2.1