]> git.ipfire.org Git - thirdparty/qemu.git/commit - block.c
block: honor BDRV_O_ALLOW_RDWR when clearing bs->read_only
authorJeff Cody <jcody@redhat.com>
Fri, 7 Apr 2017 20:55:27 +0000 (16:55 -0400)
committerJeff Cody <jcody@redhat.com>
Mon, 24 Apr 2017 19:09:33 +0000 (15:09 -0400)
commitd6fcdf06d9fc7d72151cc2069dc5c1adf5c21707
tree540436244a6886cb53b4e2cd9beb10f67526b6a1
parente2b8247a322cd92945785edf25f09e6b3e8285f9
block: honor BDRV_O_ALLOW_RDWR when clearing bs->read_only

The BDRV_O_ALLOW_RDWR flag allows / prohibits the changing of
the BDS 'read_only' state, but there are a few places where it
is ignored.  In the bdrv_set_read_only() helper, make sure to
honor the flag.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: be2e5fb2d285cbece2b6d06bed54a6f56520d251.1491597120.git.jcody@redhat.com
block.c