On Mon, Jan 27, 2014 at 11:48:11AM +0800, Fam Zheng wrote:
> +pstrcpy(bs->backing_file, sizeof(bs->backing_file),
> backing_hd->filename);
> +pstrcpy(bs->backing_format, sizeof(bs->backing_file),
> +backing_hd->drv ? backing_hd->drv->format_name : "");
> +bdrv_ref(bs->backi
This is the common but non-trivial steps to assign or change the
backing_hd of BDS.
Signed-off-by: Fam Zheng
---
block.c | 39 ++-
include/block/block.h | 1 +
2 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/block.c b/block.c
ind