Re: [Qemu-devel] [PATCH RFC 2/7] block-backend: Introduce blk_root() helper

2016-12-04 Thread Hailiang Zhang
On 2016/10/25 17:58, Changlong Xie wrote: I know you need blk->root in the next patch, but we strongly don't recommend your current solution. Please refer Kevin's cf2ab8fc 1409 /* XXX Ugly way to get blk->root, but that's a feature, not a bug. This 1410 * hack makes it obvious that vhd

Re: [Qemu-devel] [PATCH RFC 2/7] block-backend: Introduce blk_root() helper

2016-10-25 Thread Changlong Xie
I know you need blk->root in the next patch, but we strongly don't recommend your current solution. Please refer Kevin's cf2ab8fc 1409 /* XXX Ugly way to get blk->root, but that's a feature, not a bug. This 1410 * hack makes it obvious that vhdx_write_header() bypasses the BlockBacke

[Qemu-devel] [PATCH RFC 2/7] block-backend: Introduce blk_root() helper

2016-10-20 Thread zhanghailiang
With this helper function, we can get the BdrvChild struct from BlockBackend Signed-off-by: zhanghailiang --- block/block-backend.c | 5 + include/sysemu/block-backend.h | 1 + 2 files changed, 6 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index 1a724a8