qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 3/10] Add bdrv_flush_all()


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH 3/10] Add bdrv_flush_all()
Date: Fri, 12 Sep 2008 18:43:46 +0300

On 9/9/08, Anthony Liguori <address@hidden> wrote:
> This patch adds a bdrv_flush_all() function.  It's necessary to ensure that 
> all
>  IO operations have been flushed to disk before completely a live migration.
>
>  N.B. we don't actually use this now.  We really should flush the block 
> drivers
>  using an live savevm callback to avoid unnecessary guest down time.
>
>  Signed-off-by: Anthony Liguori <address@hidden>
>
>  diff --git a/block.c b/block.c
>  index 544176f..921d382 100644
>  --- a/block.c
>  +++ b/block.c
>  @@ -884,6 +884,21 @@ void bdrv_flush(BlockDriverState *bs)
>          bdrv_flush(bs->backing_hd);
>   }
>
>  +void bdrv_iterate_writeable(void (*it)(BlockDriverState *bs))

Forgot "static"?

>  +{
>  +    BlockDriverState *bs;
>  +
>  +    for (bs = bdrv_first; bs != NULL; bs = bs->next)
>  +        if (bs->drv && !bdrv_is_read_only(bs) &&
>  +            (!bdrv_is_removable(bs) || bdrv_is_inserted(bs)))
>  +           it(bs);
>  +}




reply via email to

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