diff options
author | BenoƮt Canet <benoit@irqsave.net> | 2014-01-23 21:31:36 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-01-24 16:07:08 +0100 |
commit | 212a5a8f095de9a1624de6b4a589d60688b02747 (patch) | |
tree | 53ca4f11ef30c1b1b3ef931116e52d5fbb3c8ac3 /include/block/block.h | |
parent | 12d3ba821da9f8a039240a8a1bc01e27a12f9c22 (diff) |
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>
Diffstat (limited to 'include/block/block.h')
-rw-r--r-- | include/block/block.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/block/block.h b/include/block/block.h index b4a77e6cff..59d9f12ce4 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -287,16 +287,16 @@ int bdrv_amend_options(BlockDriverState *bs_new, QEMUOptionParameter *options); /* external snapshots */ typedef enum { - EXT_SNAPSHOT_ALLOWED, - EXT_SNAPSHOT_FORBIDDEN, -} ExtSnapshotPerm; - -/* return EXT_SNAPSHOT_ALLOWED if external snapshot is allowed - * return EXT_SNAPSHOT_FORBIDDEN if external snapshot is forbidden - */ -ExtSnapshotPerm bdrv_check_ext_snapshot(BlockDriverState *bs); -/* helper used to forbid external snapshots like in blkverify */ -ExtSnapshotPerm bdrv_check_ext_snapshot_forbidden(BlockDriverState *bs); + 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); /* async block I/O */ typedef void BlockDriverDirtyHandler(BlockDriverState *bs, int64_t sector, |