This is the first part of an attempt for disentangling bdrv_open(). At the end of this series, bdrv_open() code is somewhat easier to read, but the real changes (including some bug fixes and changes of behaviour) haven't happened yet.
Just sending out the first part now to get this merged early and avoid conflicts. Kevin Wolf (9): block: Create bdrv_fill_options() block: Move bdrv_fill_options() call to bdrv_open() block: Move json: parsing to bdrv_fill_options() block: Always pass driver name through options QDict block: Use common driver selection code for bdrv_open_file() block: Inline bdrv_file_open() block: Remove second bdrv_open() recursion block: Catch backing files assigned to non-COW drivers block: Remove a special case for protocols block.c | 283 ++++++++++++++++++++++----------------------- block/cow.c | 1 + block/qcow.c | 1 + block/qcow2.c | 1 + block/qed.c | 1 + block/vmdk.c | 1 + include/block/block_int.h | 3 + tests/qemu-iotests/051 | 6 + tests/qemu-iotests/051.out | 14 ++- 9 files changed, 166 insertions(+), 145 deletions(-) -- 1.8.3.1