diff options
author | Max Reitz <mreitz@redhat.com> | 2019-11-08 13:34:53 +0100 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2020-01-06 13:43:06 +0100 |
commit | 69c6449ff10fe4e3219e960549307096d5366bd0 (patch) | |
tree | 1ebbd1cb3a897be59d05c6e3d38f8265262f9205 /qapi/block-core.json | |
parent | cdb1cec89e6aae1df3f5488574a9c3bcd61474c6 (diff) |
blkdebug: Allow taking/unsharing permissions
Sometimes it is useful to be able to add a node to the block graph that
takes or unshare a certain set of permissions for debugging purposes.
This patch adds this capability to blkdebug.
(Note that you cannot make blkdebug release or share permissions that it
needs to take or cannot share, because this might result in assertion
failures in the block layer. But if the blkdebug node has no parents,
it will not take any permissions and share everything by default, so you
can then freely choose what permissions to take and share.)
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20191108123455.39445-4-mreitz@redhat.com
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'qapi/block-core.json')
-rw-r--r-- | qapi/block-core.json | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json index fcb52ec24f..839b10b3f0 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -3454,6 +3454,16 @@ # # @set-state: array of state-change descriptions # +# @take-child-perms: Permissions to take on @image in addition to what +# is necessary anyway (which depends on how the +# blkdebug node is used). Defaults to none. +# (since 5.0) +# +# @unshare-child-perms: Permissions not to share on @image in addition +# to what cannot be shared anyway (which depends +# on how the blkdebug node is used). Defaults +# to none. (since 5.0) +# # Since: 2.9 ## { 'struct': 'BlockdevOptionsBlkdebug', @@ -3463,7 +3473,9 @@ '*opt-write-zero': 'int32', '*max-write-zero': 'int32', '*opt-discard': 'int32', '*max-discard': 'int32', '*inject-error': ['BlkdebugInjectErrorOptions'], - '*set-state': ['BlkdebugSetStateOptions'] } } + '*set-state': ['BlkdebugSetStateOptions'], + '*take-child-perms': ['BlockPermission'], + '*unshare-child-perms': ['BlockPermission'] } } ## # @BlockdevOptionsBlklogwrites: |