blkdebug: Allow taking/unsharing permissions
commit69c6449ff10fe4e3219e960549307096d5366bd0
authorMax Reitz <mreitz@redhat.com>
Fri, 8 Nov 2019 12:34:53 +0000 (8 13:34 +0100)
committerMax Reitz <mreitz@redhat.com>
Mon, 6 Jan 2020 12:43:06 +0000 (6 13:43 +0100)
tree1ebbd1cb3a897be59d05c6e3d38f8265262f9205
parentcdb1cec89e6aae1df3f5488574a9c3bcd61474c6
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>
block/blkdebug.c
qapi/block-core.json