This is the next version of the format/protocol split RFC that Christoph posted on Monday. I did fix image creation in his original patch and added some additional patches for more cleanup and to fix the no_zero_init bug that is mentioned in the commit log of this first patch.
One point that still needs to be done is converting all the random format drivers that noone uses to use block.c functions instead of POSIX functions. In some points they look like protocol drivers rather than format drivers otherwise. If there are no other important issues left, I'm going to merge this into the block branch soon. Christoph Hellwig (1): block: separate raw images from the file protocol Kevin Wolf (4): block: Split bdrv_open block: Avoid forward declaration of bdrv_open_common block: Open the underlying image file in generic code block: bdrv_has_zero_init Makefile.objs | 2 +- block.c | 266 ++++++++++++++++++++++++++++++++---------------- block.h | 2 + block/blkdebug.c | 17 +-- block/bochs.c | 2 +- block/cloop.c | 2 +- block/cow.c | 2 +- block/curl.c | 10 +- block/dmg.c | 2 +- block/nbd.c | 2 +- block/parallels.c | 2 +- block/qcow.c | 69 ++++++------- block/qcow2-cluster.c | 64 ++++++------ block/qcow2-refcount.c | 80 +++++++------- block/qcow2-snapshot.c | 22 ++-- block/qcow2.c | 67 +++++------- block/qcow2.h | 2 +- block/raw-posix.c | 25 +++-- block/raw-win32.c | 16 ++-- block/raw.c | 144 ++++++++++++++++++++++++++ block/vdi.c | 30 ++---- block/vmdk.c | 2 +- block/vpc.c | 34 +++---- block/vvfat.c | 2 +- block_int.h | 5 +- qemu-img.c | 6 +- 26 files changed, 544 insertions(+), 333 deletions(-) create mode 100644 block/raw.c