qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 6/7] block: Use bdrv_set_backing_hd everywhere


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 6/7] block: Use bdrv_set_backing_hd everywhere
Date: Fri, 23 May 2014 14:47:55 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, May 23, 2014 at 11:23:22AM +0800, Fam Zheng wrote:
> We need to handle the coming backing_blocker properly, so don't open
> code the assignment, instead, call bdrv_set_backing_hd to change
> backing_hd.
> 
> Signed-off-by: Fam Zheng <address@hidden>
> ---
>  block.c        | 4 ++--
>  block/stream.c | 4 ++--
>  block/vvfat.c  | 2 +-
>  3 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/block.c b/block.c
> index 911ba68..91c866c 100644
> --- a/block.c
> +++ b/block.c
> @@ -2652,13 +2652,13 @@ int bdrv_drop_intermediate(BlockDriverState *active, 
> BlockDriverState *top,
>      if (ret) {
>          goto exit;
>      }
> -    new_top_bs->backing_hd = base_bs;
> +    bdrv_set_backing_hd(new_top_bs, base_bs);
>  
>      bdrv_refresh_limits(new_top_bs);

bdrv_set_backing_hd() already does bdrv_refresh_limits() when backing_hd
!= NULL (and base_bs is always non-NULL in this code path).  The
bdrv_refresh_limits() can be dropped.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]