summaryrefslogtreecommitdiffstats
path: root/include/block/block.h
diff options
context:
space:
mode:
authorBenoƮt Canet2014-03-03 19:11:34 +0100
committerStefan Hajnoczi2014-03-13 14:23:27 +0100
commitb5042a36229b4fa5eeb66bbcde78f704975aec00 (patch)
tree9b63ed8cc27e1624968e9715a35a73fb6fc2cfd3 /include/block/block.h
parentiotests: Test corruption during COW request (diff)
downloadqemu-b5042a36229b4fa5eeb66bbcde78f704975aec00.tar.gz
qemu-b5042a36229b4fa5eeb66bbcde78f704975aec00.tar.xz
qemu-b5042a36229b4fa5eeb66bbcde78f704975aec00.zip
block: Rewrite the snapshot authorization mechanism for block filters.
This patch keep the recursive way of doing things but simplify it by giving two responsabilities to all block filters implementors. They will need to do two things: -Set the is_filter field of their block driver to true. -Implement the bdrv_recurse_is_first_non_filter method of their block driver like it is done on the Quorum block driver. (block/quorum.c) [Paolo Bonzini <pbonzini@redhat.com> pointed out that this patch changes the semantics of blkverify, which now recurses down both bs->file and s->test_file. -- Stefan] Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r--include/block/block.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/include/block/block.h b/include/block/block.h
index 780f48b7b3..bd34d14109 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -286,15 +286,6 @@ int bdrv_check(BlockDriverState *bs, BdrvCheckResult *res, BdrvCheckMode fix);
int bdrv_amend_options(BlockDriverState *bs_new, QEMUOptionParameter *options);
/* external snapshots */
-
-typedef enum {
- BS_IS_A_FILTER,
- BS_FILTER_PASS_DOWN,
- BS_AUTHORIZATION_COUNT,
-} BsAuthorization;
-
-bool bdrv_generic_is_first_non_filter(BlockDriverState *bs,
- BlockDriverState *candidate);
bool bdrv_recurse_is_first_non_filter(BlockDriverState *bs,
BlockDriverState *candidate);
bool bdrv_is_first_non_filter(BlockDriverState *candidate);