diff options
Diffstat (limited to 'hw/block/block.c')
-rw-r--r-- | hw/block/block.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/block/block.c b/hw/block/block.c index 7059ba1420..27878d0087 100644 --- a/hw/block/block.c +++ b/hw/block/block.c @@ -65,12 +65,14 @@ void blkconf_apply_backend_options(BlockConf *conf, bool readonly, perm |= BLK_PERM_WRITE; } - /* TODO Remove BLK_PERM_WRITE unless explicitly configured so */ shared_perm = BLK_PERM_CONSISTENT_READ | BLK_PERM_WRITE_UNCHANGED | - BLK_PERM_GRAPH_MOD | BLK_PERM_WRITE; + BLK_PERM_GRAPH_MOD; if (resizable) { shared_perm |= BLK_PERM_RESIZE; } + if (conf->share_rw) { + shared_perm |= BLK_PERM_WRITE; + } ret = blk_set_perm(blk, perm, shared_perm, errp); if (ret < 0) { |