This is version 2. The change between previous patch (only 3/4) is the order of closing/re-opening the image.
Naphtali Sprei (4): Add open_flags to BlockDriverState Will be used later qemu-img: Fix qemu-img can't create qcow image based on read-only image Block: readonly changes Open backing file read-only also for snapshot mode