A comment from Christoph Hellwig made me check (and fix) some stuff. I'm afraid there are some more callers that needs to explicitly ask for read-write permissions. I'd like to get comments about that.
P.S. The qcow2 bug (I introduced) in pre-allocate showed me there's a need to check return value. Naphtali Sprei (3): No need anymore for bdrv_set_read_only Ask for read-write permissions when opening files where needed Read-only device changed to opens it's file for read-only. block.c | 7 ------- block.h | 1 - block/bochs.c | 6 ++---- block/parallels.c | 6 ++---- block/qcow2.c | 2 +- block/vvfat.c | 2 +- qemu-img.c | 4 ++-- 7 files changed, 8 insertions(+), 20 deletions(-)