On Wed 15 Apr 2015 06:09:18 PM CEST, Max Reitz <address@hidden> wrote:
+ orig_bs_flags = bdrv_get_flags(bs);
+ if (!(orig_bs_flags & BDRV_O_RDWR)) {
I feel like we don't want to do this if we're not streaming to an
intermediate layer but to the top layer (because that means there is
some reason for the BDS to be read-only beyond it just being a backing
BDS).
Looks like we don't actually need to do anything, bdrv_reopen_prepare()
already takes care of checking the BDRV_O_ALLOW_RDWR flag, which is not
set if the image was opened in read-only mode.