]> git.proxmox.com Git - mirror_qemu.git/commit
block: Add bdrv_reopen_set_read_only()
authorAlberto Garcia <berto@igalia.com>
Mon, 12 Nov 2018 14:00:33 +0000 (16:00 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 14 Dec 2018 10:55:01 +0000 (11:55 +0100)
commit6e1000a863f9dcdb4a6f51cd7cd0782f23120ba5
tree55e2e61726db55960febfee3d3d85de06831fbae
parent0342567115feaf24bafcb25be903a9d732ac78ca
block: Add bdrv_reopen_set_read_only()

Most callers of bdrv_reopen() only use it to switch a BlockDriverState
between read-only and read-write, so this patch adds a new function
that does just that.

We also want to get rid of the flags parameter in the bdrv_reopen()
API, so this function sets the "read-only" option and passes the
original flags (which will then be updated in bdrv_reopen_prepare()).

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
include/block/block.h