On Thu, Jan 30, 2025 at 06:12:37PM +0100, Kevin Wolf wrote: > 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 <kw...@redhat.com> > --- > block.c | 7 +++++++ > block/block-backend.c | 2 +- > 2 files changed, 8 insertions(+), 1 deletion(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature