diff options
author | Kevin Wolf <kwolf@redhat.com> | 2025-02-04 22:13:57 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2025-02-06 14:26:51 +0100 |
commit | 8c2c72a33581987af8d8c484d03af3cd69b9e10a (patch) | |
tree | fb6d2988a965ade923933c24ffdd55f23ef71c7a /rust/qemu-api-macros | |
parent | 9b81361aedcc47905de5e91f68221de89c6f5467 (diff) | |
download | qemu-8c2c72a33581987af8d8c484d03af3cd69b9e10a.zip qemu-8c2c72a33581987af8d8c484d03af3cd69b9e10a.tar.gz qemu-8c2c72a33581987af8d8c484d03af3cd69b9e10a.tar.bz2 |
block: Fix crash on block_resize on inactive node
In order for block_resize to fail gracefully on an inactive node instead
of crashing with an assertion failure in bdrv_co_write_req_prepare()
(called from bdrv_co_truncate()), we need to check for inactive nodes
also when they are attached as a root node and make sure that
BLK_PERM_RESIZE isn't among the permissions allowed for inactive nodes.
To this effect, don't enumerate the permissions that are incompatible
with inactive nodes any more, but allow only BLK_PERM_CONSISTENT_READ
for them.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20250204211407.381505-7-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'rust/qemu-api-macros')
0 files changed, 0 insertions, 0 deletions