block: Rewrite the snapshot authorization mechanism for block filters.
commitb5042a36229b4fa5eeb66bbcde78f704975aec00
authorBenoît Canet <benoit.canet@irqsave.net>
Mon, 3 Mar 2014 18:11:34 +0000 (3 19:11 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 13 Mar 2014 13:23:27 +0000 (13 14:23 +0100)
tree9b63ed8cc27e1624968e9715a35a73fb6fc2cfd3
parent98d39e34fe95f8609be3ccbd1b67926631d2c7c0
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>
block.c
block/blkverify.c
block/quorum.c
include/block/block.h
include/block/block_int.h