Re: [Qemu-devel] [PATCH v2 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-16 Thread Benoît Canet
#include qemu-common.h -#include block/block_int.h +#include block/block.h +#include qemu/error-report.h +#include qemu/main-loop.h That's a lot of include fiddling I am not sure to understand them while looking at the following diff. #include hw/hw.h #include qemu/queue.h #include

Re: [Qemu-devel] [PATCH v2 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-16 Thread Markus Armbruster
Benoît Canet benoit.ca...@nodalink.com writes: #include qemu-common.h -#include block/block_int.h +#include block/block.h +#include qemu/error-report.h +#include qemu/main-loop.h That's a lot of include fiddling I am not sure to understand them while looking at the following diff.

Re: [Qemu-devel] [PATCH v2 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-16 Thread Paolo Bonzini
Il 16/09/2014 16:08, Markus Armbruster ha scritto: +if (bs-device_list.tqe_prev) { QTAILQ_REMOVE(bdrv_states, bs, device_list); +bs-device_list.tqe_prev = NULL; I think a comments explaining the trick you are doing here would be worthy: after all you are touching

Re: [Qemu-devel] [PATCH v2 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-16 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Il 16/09/2014 16:08, Markus Armbruster ha scritto: +if (bs-device_list.tqe_prev) { QTAILQ_REMOVE(bdrv_states, bs, device_list); +bs-device_list.tqe_prev = NULL; I think a comments explaining the trick you are doing here

[Qemu-devel] [PATCH v2 08/23] block: Eliminate BlockDriverState member device_name[]

2014-09-13 Thread Markus Armbruster
device_name[] can become non-empty only in bdrv_new_root() and bdrv_move_feature_fields(). The latter is used only to undo damage done by bdrv_swap(). The former is called only by blk_new_with_bs(). Therefore, when a BlockDriverState's device_name[] is non-empty, then it's been created with a