if ((!file || !*file) && !qdict_size(bs_opts)) {
BlockBackendRootState *blk_rs;
- blk = blk_new();
+ blk = blk_new(0, BLK_PERM_ALL);
blk_rs = blk_get_root_state(blk);
blk_rs->open_flags = bdrv_flags;
blk_rs->read_only = read_only;
goto out;
}
- blk = blk_new();
+ blk = blk_new(BLK_PERM_RESIZE, BLK_PERM_ALL);
blk_insert_bs(blk, bs);
/* complete all in-flight operations before resizing the device */